Bug 153372

Summary: selection stays visible while browsing history
Product: [Applications] konsole Reporter: Edwin Schepers <yez>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: kde, robertknight
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Fix the selection clearing problem
Document the public checkSelection function
The correct checkSelection documentation patch

Description Edwin Schepers 2007-12-03 21:46:16 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.22-5-default

Hi,
When I have selected text after the shell prompt and I browse the history with the arrowkey, the selection stays visible.
On certain text in the history, the selection disappears.

Regards,
Edwin
Comment 1 Robert Knight 2008-06-02 08:04:26 UTC
I cannot reproduce this locally.  

> On certain text in the history, the selection disappears. 

Any idea what "certain text" is?
Comment 2 Klaus S. Madsen 2008-11-07 20:08:40 UTC
I see the same problem. If you start top, and select some of the non-static contents, the selection doesn't disappear when the text below is changed.

This happens because the checkSelection function expects a range, but receives an X and Y coordinate from the the displayCharacter function. The attached patch fixes it.

I'll also attach a patch documents the checkSelection function. However I think that this function should be private. If wanted I can provide a patch for this also.
Comment 3 Klaus S. Madsen 2008-11-07 20:09:18 UTC
Created attachment 28397 [details]
Fix the selection clearing problem
Comment 4 Klaus S. Madsen 2008-11-07 20:09:44 UTC
Created attachment 28398 [details]
Document the public checkSelection function
Comment 5 Klaus S. Madsen 2008-11-07 20:23:36 UTC
Forgot to mention that the two patches are against SVN this evening.
Comment 6 Robert Knight 2008-11-07 20:59:04 UTC
Thank-you.  Patch looks good.  Will test and commit.  You appear to have attached the same patch twice though - the patch to the header file is missing.
Comment 7 Klaus S. Madsen 2008-11-07 21:11:15 UTC
Created attachment 28400 [details]
The correct checkSelection documentation patch

Sorry about that. I succeeded in confusing myself about which part of the patch should be removed from the diff, when splitting it.

However I believe that this function ought to be protected, instead of public. I haven't performed this change, as I'm not sure that changing the API is allowed? However if deemed acceptable, I can create a patch to do this.

And thanks for your quick response. Quite impressive :-)
Comment 8 Robert Knight 2008-11-07 21:39:48 UTC
If the method is not used anywhere else then I'll make it private.
Comment 9 Klaus S. Madsen 2008-12-04 13:24:11 UTC
Was this patch ever applied? I've looked in the SVN trunk, and I've not been able to find it? Or was there an issue with the patch?

I've used konsole for a month now, with this patch applied, and I haven't seen the issue during this time.
Comment 10 Kurt Hindenburg 2009-03-19 04:53:53 UTC
SVN commit 941204 by hindenburg:

Clear selection on selected text when it is not static.

BUG: 153372


 M  +2 -2      Screen.cpp  
 M  +10 -1     Screen.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=941204
Comment 11 Kurt Hindenburg 2009-03-19 04:54:43 UTC
SVN commit 941205 by hindenburg:

Clear selection on selected text when it is not static.

CCBUG: 153372


 M  +2 -2      Screen.cpp  
 M  +10 -1     Screen.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=941205