STEPS TO REPRODUCE 1. Launch Konsole and try to select and copy only one character using 'ctrl_shift_c'. OBSERVED RESULT ^C is sent instead of copying the character. EXPECTED RESULT The character selected is copied. SOFTWARE/OS VERSIONS Linux: Gentoo Linux KDE Plasma Version: git master KDE Frameworks Version: git master Qt Version: 5.15.2 (KDE) git master ADDITIONAL INFORMATION Not a full KDE Plasma install, but just enough to use KWin with LXQt. This starts with commit 5919c1fd0a2 [1]. 1. https://invent.kde.org/utilities/konsole/-/commit/5919c1fd0a2e174079055b747aa279209900c6c6
src/Screen.cpp:1428 isSelectionEmpty() returns true with a selection of 1 character as _selTopLeft equals _selBottomRight. This causes the program to think there is no selection. I don't know the Konsole code well enough, but I don't see why isSelectionEmpty() can't be just replaced with hasSelection() as with my compile that seems to fix this problem (I don't know if there can be a valid selection that is empty).
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/574
Git commit 830f416850911ec4f0104635fee9fb8f832c1dcc by Kurt Hindenburg, on behalf of Luis Javier Merino Morán. Committed on 11/01/2022 at 15:44. Pushed by hindenburg into branch 'master'. Fix copying one single char Regression introduced by 5919c1fd. The selection range is inclusive in both ends. Thanks to Chiitoo for reporting and to Yerrey Dev for proposing a solution. M +1 -1 src/Emulation.cpp M +0 -9 src/Screen.cpp M +0 -1 src/Screen.h https://invent.kde.org/utilities/konsole/commit/830f416850911ec4f0104635fee9fb8f832c1dcc