Bug 413426

Summary: Show highlight until end of line in selection including newline
Product: [Applications] konsole Reporter: Raphael Rosch <kdebugs>
Component: emulationAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Raphael Rosch 2019-10-25 08:02:56 UTC
SUMMARY

When selecting text in Konsole (via mouse, for example), if you have multiple lines selected, all but the last line show a full line highlight. It is misleading when the bottom-most line includes a newline in the selection. It would be great if, as soon as the newline character enters the selection, the highlight goes all the way to the right, highlighting the whole line from the first selected character of that line. 


STEPS TO REPRODUCE
1. open Konsole and run a command that generates a few lines of text
2. drag-select using mouse at least two lines, where you select past a newline character in the bottom-most line
3. 

OBSERVED RESULT
Highlight appears to indicate the selection of "space" characters.

EXPECTED RESULT
Highlight should go until the rightmost edge of display area.


SOFTWARE/OS VERSIONS
konsole: git master
Linux/KDE Plasma: FC27 32bit
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.48
Qt Version: 5.9.6

ADDITIONAL INFORMATION
Comment 1 tcanabrava 2022-05-26 08:19:26 UTC
Git commit 836b1d981485717d1cb6738ef0a901c3600d4742 by Tomaz  Canabrava, on behalf of Luis Javier Merino MorĂ¡n.
Committed on 26/05/2022 at 08:12.
Pushed by tcanabrava into branch 'master'.

Selecting past last char -> extend to last column

When selecting past the last character, extend the selection to the last
column.  This allows the user to know when the selection has extended
past the last character on a line, even in the presence of trailing
spaces, and will get a newline added to the last line.

This is the behavior of xterm, VTE and rxvt.  mlterm doesn't allow
selections to extend past the last non-space character on a line.
Related: bug 158726

M  +36   -2    src/Screen.cpp
M  +2    -1    src/Screen.h
M  +3    -3    src/ScreenWindow.cpp
M  +1    -1    src/ScreenWindow.h
M  +2    -2    src/autotests/ScreenTest.cpp
M  +4    -4    src/terminalDisplay/TerminalDisplay.cpp
M  +5    -0    src/terminalDisplay/TerminalDisplay.h
M  +1    -1    src/widgets/TerminalDisplayAccessible.cpp

https://invent.kde.org/utilities/konsole/commit/836b1d981485717d1cb6738ef0a901c3600d4742