Bug 319260 - triple-click with very long lines only selects part that is visible
Summary: triple-click with very long lines only selects part that is visible
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-03 08:41 UTC by Jonathan Marten
Modified: 2014-02-07 14:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.13


Attachments
Screen shot - original state before click (31.16 KB, image/png)
2013-05-03 08:42 UTC, Jonathan Marten
Details
Screen shot - after triple click (30.98 KB, image/png)
2013-05-03 08:42 UTC, Jonathan Marten
Details
Screen shot - after scrolling down (31.90 KB, image/png)
2013-05-03 08:43 UTC, Jonathan Marten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Marten 2013-05-03 08:41:32 UTC
If a very long line is displayed which extends above or below the currently visible area, then triple-clicking on part of that line selects only the part of the line which is visible.  The text which is logially part of the same line but which is scrolled out of view is not selected.


Reproducible: Always

Steps to Reproduce:
1.  The screen shots were taken during a build of WebKit, which produces very long complier command lines.  But the same can be demonstrated with a command such as, for example, "ls -l | tr '\n' ' '".  Execute this command in an empty Konsole and ensure that it produced enough text to scroll some off the top.

2.  Triple-click somewhere in the bottom 1/3 of the window to select the line.

3.  Scroll up or down, observe that the selection stops at the original visible area boundary.

Actual Results:  
Not all of the line is selected, those parts of it that were originally not visible are not selected.


Expected Results:  
All of the line should be selected regardless of whether it was visible or not.
Comment 1 Jonathan Marten 2013-05-03 08:42:11 UTC
Created attachment 79656 [details]
Screen shot - original state before click
Comment 2 Jonathan Marten 2013-05-03 08:42:31 UTC
Created attachment 79657 [details]
Screen shot - after triple click
Comment 3 Jonathan Marten 2013-05-03 08:43:03 UTC
Created attachment 79658 [details]
Screen shot - after scrolling down
Comment 4 Yichao Yu 2013-07-06 13:06:52 UTC
Same problem here. And this not only affects triple click, it affects double click selection as well if that word happens to be partially outside visible region.

The problem seems to be the internal function for selecting text cannot handle starting (and ending) a selection out of visible region?
Comment 5 Kurt Hindenburg 2013-07-06 14:24:57 UTC
Yes that appears to be case.
Comment 6 Yichao Yu 2013-07-07 22:42:06 UTC
Review request submitted.
https://git.reviewboard.kde.org/r/111441/
Comment 7 Kurt Hindenburg 2014-01-12 18:55:09 UTC
Git commit 0b69bdcd40d93d9b87b729a978974b1cc2a77b35 by Kurt Hindenburg.
Committed on 12/01/2014 at 18:51.
Pushed by hindenburg into branch 'master'.

Fix double click can only select text within visible region

Double-clicking on text will highlight text not on the visible screen.
This is the 2nd part of this patch.  The first part for triple clicking
highlighting the entire line is already in 2.12.

Thanks to Yichao Yu yyc1992@gmail.com for this big patch.

REVIEW: 111441
FIXED-IN: 2.13

M  +140  -124  src/TerminalDisplay.cpp
M  +2    -0    src/TerminalDisplay.h

http://commits.kde.org/konsole/0b69bdcd40d93d9b87b729a978974b1cc2a77b35
Comment 8 Kurt Hindenburg 2014-02-07 14:33:20 UTC
Git commit 914067d14a6a27b59bba1c53cc18cb67eb9811fc by Kurt Hindenburg.
Committed on 12/01/2014 at 18:51.
Pushed by hindenburg into branch 'frameworks'.

Fix double click can only select text within visible region

Double-clicking on text will highlight text not on the visible screen.
This is the 2nd part of this patch.  The first part for triple clicking
highlighting the entire line is already in 2.12.

Thanks to Yichao Yu yyc1992@gmail.com for this big patch.

REVIEW: 111441
FIXED-IN: 2.13
(cherry picked from commit 0b69bdcd40d93d9b87b729a978974b1cc2a77b35)

M  +140  -124  src/TerminalDisplay.cpp
M  +2    -0    src/TerminalDisplay.h

http://commits.kde.org/konsole/914067d14a6a27b59bba1c53cc18cb67eb9811fc