Summary: | "trim leading spaces" eats empty lines | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Oswald Buddenhagen <ossi> |
Component: | copy-paste | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mglb |
Priority: | NOR | ||
Version: | 19.08.1 | ||
Target Milestone: | --- | ||
Platform: | Debian unstable | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/konsole/67a29e4134ff80cb64291b84ebeea27a1b247fd5 | Version Fixed In: | 19.08.2 |
Sentry Crash Report: |
Description
Oswald Buddenhagen
2019-09-30 10:39:10 UTC
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 |