Bug 496572 - Dynamic Word Wrap inserts line breaks while Static Word Wrap doesn't
Summary: Dynamic Word Wrap inserts line breaks while Static Word Wrap doesn't
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: kwrite (other bugs)
Version First Reported In: 24.08.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-22 06:12 UTC by daigennki
Modified: 2024-11-23 15:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daigennki 2024-11-22 06:12:03 UTC
SUMMARY
I want to constrain the length of long lines without inserting line breaks into the actual text file. I've been told that "Dynamic Word Wrap" should do what I want. However, when "Dynamic Word Wrap" is enabled, a line break gets inserted at the configured fixed column, instead of only wrapping the line in the editor. This happens whether it's enabled with "View -> Word Wrap -> Dynamic Word Wrap", or with "Configure KWrite -> Editing -> General -> Word Wrap -> Wrap words at fixed column".

Also, enabling "View -> Word Wrap -> Static Word Wrap" stops the line breaks from being inserted and makes Dynamic Word Wrap do what I want it to do. I assume enabling Static Word Wrap should actually make line breaks inserted, while having it disabled with Dynamic Word Wrap enabled only wraps the line in the editor view. In addition, when Dynamic Word Wrap is turned off, Static Word Wrap doesn't seem to do anything.

STEPS TO REPRODUCE
1.  Enable "Dynamic Word Wrap" or "Wrap words at fixed column".
2.  Type in a sentence longer than the configured column.

OBSERVED RESULT
A line break gets inserted at the configured column.

EXPECTED RESULT
A line break shouldn't get inserted, and the line should only be wrapped in the editor view.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 41
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0

ADDITIONAL INFORMATION
This issue was originally brought up in this discussion:
https://discuss.kde.org/t/static-word-wrap-gets-disabled-whenever-kwrite-is-re-opened/25831
Comment 1 Christoph Cullmann 2024-11-23 15:02:59 UTC
Works for me as intended. As long as the 'Word wrap: Wrap words at....' is not enabled no new lines are added.