enabling "trim leading spaces" in the profile leads to empty lines between paragraphs being discarded from the selection, which is certainly not expected for an option with this name. i also found it somewhat unhelpful that it eats leading spaces on each line rather than just the first one, but that's at least technically correct, as it's consistent with what "trim trailing spaces" does.
Confirmed on master
I wonder if something in Qt changed since this went in. This appears to work - we don't want newlines \xa to be counted as spaces. - if (!QChar(characterBuffer[spacesCount].character).isSpace()) { + const QChar currentChar = characterBuffer[spacesCount].character; + if (currentChar == QChar(QLatin1Char('\xa')) || !currentChar.isSpace()) {
QChar::isSpace includes new lines at least since Qt4. Fix: https://invent.kde.org/kde/konsole/merge_requests/37
thanks - there should be tests for these so they don't get overlooked - not even sure that's possible ATM
Git commit ce2029ed75b624a9f9abb5e27428bcb51ad1e5b5 by Mariusz Glebocki. Committed on 05/10/2019 at 17:13. Pushed by mglebocki into branch 'master'. Keep empty lines when "trim leading spaces" is enabled M +1 -1 src/Screen.cpp https://invent.kde.org/kde/konsole/commit/ce2029ed75b624a9f9abb5e27428bcb51ad1e5b5
Git commit ce2029ed75b624a9f9abb5e27428bcb51ad1e5b5 by Mariusz Glebocki. Committed on 05/10/2019 at 17:13. Pushed by scmsync into branch 'master'. Keep empty lines when "trim leading spaces" is enabled M +1 -1 src/Screen.cpp https://commits.kde.org/konsole/ce2029ed75b624a9f9abb5e27428bcb51ad1e5b5
Git commit 67a29e4134ff80cb64291b84ebeea27a1b247fd5 by Kurt Hindenburg, on behalf of Mariusz Glebocki. Committed on 05/10/2019 at 21:09. Pushed by hindenburg into branch 'Applications/19.08'. Keep empty lines when "trim leading spaces" is enabled (cherry picked from commit ce2029ed75b624a9f9abb5e27428bcb51ad1e5b5) M +1 -1 src/Screen.cpp https://invent.kde.org/kde/konsole/commit/67a29e4134ff80cb64291b84ebeea27a1b247fd5
Git commit 67a29e4134ff80cb64291b84ebeea27a1b247fd5 by Kurt Hindenburg, on behalf of Mariusz Glebocki. Committed on 05/10/2019 at 21:09. Pushed by scmsync into branch 'Applications/19.08'. Keep empty lines when "trim leading spaces" is enabled (cherry picked from commit ce2029ed75b624a9f9abb5e27428bcb51ad1e5b5) M +1 -1 src/Screen.cpp https://commits.kde.org/konsole/67a29e4134ff80cb64291b84ebeea27a1b247fd5