https://bugs.kde.org/show_bug.cgi?id=491923
Bug ID: 491923 Summary: wrapping should be informed by syntax rules, e.g. don't wrap in the middle of an operator Classification: Applications Product: kate Version: 24.05.2 Platform: unspecified OS: All Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kwrite-bugs-n...@kde.org Reporter: kdeb...@toeai.com Target Milestone: --- Created attachment 172762 --> https://bugs.kde.org/attachment.cgi?id=172762&action=edit screenshot of break in the middle of operator when there's plenty of space, but > sticks to following character SUMMARY It's nice to have syntax highlighting with colors, but the interpretation needs to go deeper by controlling where lines break in wrapping mode. STEPS TO REPRODUCE For example, look at where Kate breaks something like "myobject->fieldname" for a C/C++ code file. OBSERVED RESULT It sees a breaking point after the hyphen (-) and nowhere else. EXPECTED RESULT It should see breaking points before the hyphen (-) and after the greater-than (>), but not between them, because "->" should be treated as a word that should stay together. I'm attaching two screenshots, each with the same text, but different fonts. The first line is just to show the width of the line. The second shows the bad wrapping behavior. The third line is the same as the second, but with a space between the ">" and the "i", which allows a break where there should be one anyway. The first screenshot is with the default "Hack" font. The second is with the popular JetBrains Mono font, which has a ligature for the operator "->". As you can see, the first half of this ligature gets cut off on the left side. -- You are receiving this mail because: You are watching all bug changes.