Commit 0b0ceed0 authored by Dominik Haumann's avatar Dominik Haumann
Browse files

do not word wrap when removing trailing spaces

Thanks to Gerald for the detailed report!

FIXED-IN: 4.11.5
BUG: 328900
parent 41e15427
......@@ -4377,6 +4377,10 @@ void KateDocument::removeTrailingSpaces()
if (remove == 0)
return;
// temporarily disable static word wrap (see bug #328900)
const bool wordWrapEnabled = config()->wordWrap ();
if (wordWrapEnabled) setWordWrap(false);
// get cursor position of active view
KTextEditor::Cursor curPos = KTextEditor::Cursor::invalid();
if (activeView()) {
......@@ -4407,6 +4411,9 @@ void KateDocument::removeTrailingSpaces()
}
editEnd();
// enable word wrap again, if it was enabled (see bug #328900)
if (wordWrapEnabled) setWordWrap(true); // see begin of this function
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment