WHAT SHOULD HAPPEN In Markdown, two spaces at the end of a line means a line break. A newly installed Kate will show two underlines `__` indicating the two spaces. WHAT HAS HAPPENED The `__` render disappears unrecoverably after changing the option "Highlight trailing spaces". With that option, Kate will be able to render with a sizeable dot like `·` for a trailing space. STEPS TO REPRODUCE 1. A newly installed Kate is required. 2. Create a file and save it as `filename.md` with contents below: ``` This is a line with two trailing spaces (two spaces here ->). The two trailing spaces means a line break (two spaces here ->). And this is a line without trailing spaces (no spaces here). A raw line break in a Markdown file acts a space (no spaces here). ``` 3. (EXPECTED RESULT) You will see the highlights like this: ``` This is a line with two trailing spaces (two spaces here ->).__ The two trailing spaces means a line break (two spaces here ->).__ And this is a line without trailing spaces (no spaces here). A raw line break in a Markdown file acts a space (no spaces here). ``` 4. Then tick the checkbox at Setting -> Configure Kate -> (left column) Editor Component -> Appearance -> (right column) Whitespace Highlighting -> Highlight trailing spaces. Apply your setting. 5. You will see the highlight like this: ``` This is a line with two trailing spaces (two spaces here ->).·· The two trailing spaces means a line break (two spaces here ->).·· And this is a line without trailing spaces (no spaces here). A raw line break in a Markdown file acts a space (no spaces here). ``` Well, for now, it seems that Kate does well because it does render the trailing space with the dot as in the Settings. BUT, if I want to switch back to the underline rendering, I find it UNRECOVERABLE. 6. Untick the checkbox at Setting -> Configure Kate -> (left column) Editor Component -> Appearance -> (right column) Whitespace Highlighting -> Highlight trailing spaces. Apply your setting. 7. (OBSERVED RESULT) You will find the highlights `__` disappear unrecoverably: ``` This is a line with two trailing spaces (two spaces here ->). The two trailing spaces means a line break (two spaces here ->). And this is a line without trailing spaces (no spaces here). A raw line break in a Markdown file acts a space (no spaces here). ``` MY SPECULATION THAT MAY HELP The `__` rendering is a part of language-specified highlights and the `·` rendering is a part of system-wide highlights. This two options are conflict with each other and adjusting the latter disables the former. SOFTWARE VERSIONS KDE Plasma Version: 5.12.6 KDE Frameworks Version: 5.44.0 Qt Version: 5.9.5 Thanks.
https://phabricator.kde.org/D19161
Git commit 8fb410574b142207d88353ed712a5bd08440d08f by Christoph Cullmann, on behalf of Ahmad Samir. Committed on 24/02/2019 at 17:06. Pushed by cullmann into branch 'master'. Use QTextFormat::TextUnderlineStyle instead of QTextFormat::FontUnderline Summary: QTextFormat::FontUnderline has been deprecated upstream for a long time. It seems that for some time setting the underline attribute for syntax highlighting has been broken, i.e. a user can't set it via the config widget and setKateExtendedAttributeList always sets it to false. The latter meant that when the user applied any changes that would write katesyntaxhighlightingrc, the underline attribute for syntax HL would unconditionally be set to false which leads to some weird situations, (e.g. bug 399278 where un/setting "highlight trailing spaces" causes katesyntaxhighlightingrc to get written to disk which leads to Markdown:linebreak losing its underline attribute for good). FIXED-IN: 5.57 Reviewers: #ktexteditor, cullmann, dhaumann Reviewed By: #ktexteditor, cullmann Subscribers: kde-frameworks-devel, kwrite-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D19161 M +2 -2 src/schema/katestyletreewidget.cpp M +1 -1 src/syntax/katehighlight.cpp M +1 -1 src/syntax/katesyntaxmanager.cpp https://commits.kde.org/ktexteditor/8fb410574b142207d88353ed712a5bd08440d08f