https://bugs.kde.org/show_bug.cgi?id=474690

            Bug ID: 474690
           Summary: incorrect scroll position after paste
    Classification: Applications
           Product: kate
           Version: 22.08.2
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: part
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: kdeb...@toeai.com
  Target Milestone: ---

Created attachment 161719
  --> https://bugs.kde.org/attachment.cgi?id=161719&action=edit
example of data to paste which reproduces the bug

SUMMARY
The scroll position seems to be incorrectly calculated when pasting data.
These three things should always be true, but aren't always:
1) If a document contains enough text to require vertical scrolling, then there
should always be less than one line of space below the last line (above the
status bar).
2) If the data to paste contains enough text that vertical scrolling is
necessary, then pasting should result in the cursor being at the bottom of the
text area, just above the status bar.
3) After pasting, the cursor should always be scrolled into view.


STEPS TO REPRODUCE
1. Open the attached file, select all (Ctrl+A) and copy (Ctrl+C).
2. Open a new document (Ctrl+N).
3. Set Kate to use font "Hack" regular size 10.0, 1.0 line height.  Make sure
the window size fits 153 columns x 34 lines (for me, maximized window on a
1366x768 screen).
4. Paste the data (Ctrl+V).

OBSERVED RESULT
There is extra space (about one and a half lines worth) under the last line
(104), as though it scrolled past the end of the file.

EXPECTED RESULT
The last line should be at the bottom of the text area.

Also:
same thing, but with the window a few pixels shorter vertically
Observed result:
Last visible line at scroll position is the next to last line (103), thus
cursor is not visible.

When you move to a different line or go do something else, the scroll position
fixes itself.

Reproducible:
Always

Observed on:
Kubuntu 22.10
Qt version 5.15.6
KDE Frameworks version 5.98.0

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to