Bug 318449 - Selectable region should reflect the (character width of) content to be select
Summary: Selectable region should reflect the (character width of) content to be select
Status: CONFIRMED
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: 2.10.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 14:19 UTC by Yichao Yu
Modified: 2014-02-28 03:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yichao Yu 2013-04-16 14:19:32 UTC
See detail below. The problem is when doing a selecting, konsole treats all blank characters (at least space, TAB, and newline) as spaces and therefore allow to select within a character or empty region.
These behaviors can be very confusing when you think what you have selected is a single space but it is actually a tab or a newline. It also makes trailing spaces and newline indistinguishable when selecting (since all of them are treated the same).


Reproducible: Always

Steps to Reproduce:
1. echo -e '\ta'
2. try selecting the tab
3. try selecting the region after the last character

Actual Results:  
selecting the tab: http://wstaw.org/m/2013/04/16/plasma-desktopRTA475.png
selecting empty region: http://wstaw.org/m/2013/04/16/plasma-desktopAzm475.png


Expected Results:  
For selecting the tab, konsole should respect the width of the character being selected and therefore only allow selecting the whole width of TAB all at once (but not selecting each "space" in the TAB individually).
For selecting the empty region, konsole should not treat the region as if there are anything (i.e. allow selecting each "space" in the region with nothing) and therefore only allow selecting the whole region after the last character (and not the last visible character) as a whole which will be interpreted as selecting the newline.
Comment 1 Kurt Hindenburg 2014-02-15 23:53:18 UTC
On my KDE 4.12.x system, Konsole appears to handle these correctly.

It also is correct on my KDE 4.10.x system

Is there anything special w/ your setup?
Comment 2 Yichao Yu 2014-02-16 00:02:37 UTC
It's not about double clicking the tab, but just tryin to select the "space in the tab" by draging the mouse.
Comment 3 Yichao Yu 2014-02-16 00:09:18 UTC
So a more accurate description of 2 and 3 would be

2. hold and drag from the second character in the '        a' line to the third character in the same line
3. hold and drag from the tenth character in the '        a' line to the eleventh character in the same line (assuming tab is 8 characters wide)

In both case, only the region of a half width character is highlighted but the selected contents are wider than this.

P.S. xterm treat 3 correctly but not 2, xfce4-terminal (and I assume other vte applications) have both correct.
Comment 4 Yichao Yu 2014-02-16 00:12:07 UTC
I'm using zsh and I have my konsole configure files here[1] but I doubt whether they are relavant.

[1] https://github.com/yuyichao/dotfile/tree/master/konsole
Comment 5 Kurt Hindenburg 2014-02-28 03:19:33 UTC
I see, yes konsole doesn't handle a tab as 1 "character" - there are other bko about tabs if I recall