Bug 294330

Summary: Text selection in konsole scrollback does not include entire width
Product: [Applications] konsole Reporter: Aaron Williams <aaronw>
Component: copy-pasteAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: adaptee
Priority: NOR    
Version: 2.8   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.4
Sentry Crash Report:
Attachments: Picture of konsole with selected text copied to the clipboard

Description Aaron Williams 2012-02-18 02:43:06 UTC
Created attachment 68892 [details]
Picture of konsole with selected text copied to the clipboard

Version:           2.8 (using KDE 4.8.0) 
OS:                Linux

My current window is 104x52 and when I scroll back in the history and select text using the left mouse button only the first 72 columns are pasted despite showing all of the text.

It doesn't make a difference if I middle click or use copy/paste, all characters beyond the first 72 columns are dropped.

I included a snapshot picture of what I have selected from my konsole session, which is a gcc command I wish to replicate.

The problem is somewhat intermittent and comes and goes.

When I paste the output I get the following:

mips64-octeon-linux-gnu-gcc  -g  -Os   -ffunction-sections -fdata-sectioT_BASE=0xC0000000 -I/home/aaronw/projects/tot/sdk/bootloader/u-boot/incl-nostdinc -isystem /nfs/sdk/2.2.0-414/OCTEON-SDK/tools-gcc-4.3/bin/../li3.3/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fPIC -mabi=B -mabi=n32 -fPIC -Wall -Wstrict-prototypes -fno-stack-protector -I/homeder/u-boot/arch/mips/include/asm/arch-octeon   -o octeon_boot_bus.o octe

As can be seen, it is cutting off the right side.  In my scrolling information I have it set to 100000 lines.  It makes no difference if I first click "Clear Scrollback and Reset" from the view menu or not.

If I do not scroll back to select text then there is no problem.


Reproducible: Sometimes

Steps to Reproduce:
1. Create a new Konsole session which is at least 80 columns wide.
2. Generate some output on the screen where lines of text wrap.
3. Generate more output until you can scroll back in the konsole session (i.e. several ls commands).
4. Scroll back and select multiple lines of text
5. Attempt to paste those lines of text

Actual Results:  
Only the first 72 characters of each line are output. All characters beyond column 72 are lost.

Expected Results:  
I expect all of the text I select to be pasted.

OS: Linux (x86_64) release 3.1.0-1.2-desktop
Compiler: gcc
Comment 1 Jekyll Wu 2012-02-28 15:33:04 UTC
Thanks for reporting, and sorry for late response.

I tried but failed to reproduce the reported problem.  

The reported problem might be related with bug 188528, or another side effect of my immature commit in comment #108 . 

Could you please check whether the problem also exists in konsole-2.7.x(the version included in KDE SC 4.7.x)?. That would help to know whether it is an old or new bug. Also, try to use another colorscheme(for example: WhiteOnBlack) and check whether that makes any difference.
Comment 2 Aaron Williams 2012-02-28 17:03:35 UTC
I never saw this problem in 4.7 and earlier and the problem is rather intermittent, though when it happens it is quite repeatable, even in new konsole sessions. Note that at times I can get a lot of scrollback data with long lines of text since I do a lot of compiling with 100,000 lines of scrollback.
Comment 3 Jekyll Wu 2012-04-26 13:36:25 UTC
Are you using fixed-size scrolback or unlimited scrollback? I'm asking because I have recently noticed another regression which is present only when using fixed-size scrollback.
Comment 4 Aaron Williams 2012-04-26 18:56:17 UTC
I use a fixed scrollback buffer, typically 10000 lines. I have also seen it where the text I select is not under the cursor but off a few lines.
Comment 5 Jekyll Wu 2012-05-17 12:14:25 UTC
Git commit f2151c5e29f13722bf00ba0fba31573211fc2e09 by Jekyll Wu.
Committed on 17/05/2012 at 13:53.
Pushed by jekyllwu into branch 'master'.

Memory-based history should save and restore the 'isRealCharacter' field

Apparently I didn't take a close look at the implementation detail of
memory-based history when I added the 'isRealCharacter' flag. That
missing information causes some wrong behaviors randomly when using
memory-based history.

This is a follow up of commit dc2b64d33(for BUG 188528)
Related: bug 299252
FIXED-IN: 4.8.4

M  +1    -0    src/History.cpp
M  +2    -0    src/History.h

http://commits.kde.org/konsole/f2151c5e29f13722bf00ba0fba31573211fc2e09
Comment 6 Jekyll Wu 2012-05-17 12:15:36 UTC
Git commit cc72338175bd8c08d4998de606e0a48ee9e6d54f by Jekyll Wu.
Committed on 17/05/2012 at 13:53.
Pushed by jekyllwu into branch 'KDE/4.8'.

Memory-based history should save and restore the 'isRealCharacter' field

Apparently I didn't take a close look at the implementation detail of
memory-based history when I added the 'isRealCharacter' flag. That
missing information causes some wrong behaviors randomly when using
memory-based history.

This is a follow up of commit dc2b64d33(for BUG 188528)
Related: bug 299252
FIXED-IN: 4.8.4
(cherry picked from commit f2151c5e29f13722bf00ba0fba31573211fc2e09)

M  +1    -0    src/History.cpp
M  +2    -0    src/History.h

http://commits.kde.org/konsole/cc72338175bd8c08d4998de606e0a48ee9e6d54f