Bug 360688 - Word wrap does not wrap when window is resized just enough to hide cursor
Summary: Word wrap does not wrap when window is resized just enough to hide cursor
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.20.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-18 06:33 UTC by Alexander Potashev
Modified: 2022-08-27 18:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2016-03-18 06:33:02 UTC
See Steps to Reproduce below.

Reproducible: Always

Steps to Reproduce:
1. Open Kate or KWrite.
2. Enable dynamic word wrapping (View -> Word Wrap -> Dynamic)
3. Type in a line of characters almost as long as the window width.
4. Move the text input cursor to the end of the line. (Press "End" on the keyboard.)
5. Resize the window to decrease its width so that the text cursor no longer fits in the KTextEditor viewport, but the line is still not wrapped due to dynamic word wrapping.

Actual Results:  
Now you can't see the cursor, even though the "word wrap" mode is designed to see everything at once, without scrolling.

Expected Results:  
Dynamic word wrap should be triggered before the viewport width becomes smaller than length of line + width of cursor.
Comment 1 Dominik Haumann 2016-03-26 14:59:55 UTC
Side note: the width of the cursor is larger in overwrite mode (full character)
Comment 2 Edward Kigwana 2019-05-25 09:30:56 UTC
This is bug. The wrapper works as it should if you (6a) hit return at the EOL or (6b) fill another line less one compared to the one in (5). Appears to be related to resizing.
Comment 3 Lothar 2019-05-26 05:53:48 UTC
From the description I also think it's not a bug and should be closed.
Not the cursor, nore some space cause a dynamic wrap, only some char.

That the the cursor disapears without a horizontal scroll is a different story/bug.
Comment 4 Christoph Cullmann 2022-08-27 18:55:54 UTC
I don't think this can be really altered.
We let Qt wrap the text and for me this works well enough.
Perhaps it improved by itself over the last X years, but I can at least always see the cursor.