Bug 52195 - Block Selection: allow to select
Summary: Block Selection: allow to select
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 56584 57287 74918 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-12-22 18:34 UTC by Tobias Hunger
Modified: 2011-08-12 11:56 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
block selection with tabs (558.54 KB, video/ogg)
2009-08-07 22:07 UTC, FiNeX
Details
mockup (54.35 KB, image/png)
2009-08-08 12:02 UTC, FiNeX
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Hunger 2002-12-22 18:34:57 UTC
Version:            (using KDE KDE 3.0.99)
Installed from:    Debian testing/unstable Packages

The manual states that in block-selection mode I can select a rea from colum 5 to 10 in lines 7 to 15 or something.

What I see is that a TAB is counted as one chracter here, which is very confusing as it is displayed as some number of spaces. So lines containing tabs stick 'out of the block' at the right side. Dunno wether this is the way god and you developers intended this to be, but it looks very strange to me;-)

Regards, Tobias
Comment 1 Hamish Rodda 2003-01-27 06:43:57 UTC
This isn't intentional but is a bit difficult to fix (block selection needs to use X 
coordinates instead of column numbers)... probably is something that will have to wait 
for 3.2. 
Comment 2 doug 2003-03-27 22:19:08 UTC
This behavior is not solely caused by tabs. Try various block selects with the text 
below. If the last line is included in the block you can only select a rectangle that is 8 
characters wide. This worked perfectly in kwrite in 2.x and works incorrectly (but 
differently) in kate and kwrite 
 
this is a line that is of the some length 
followed by a short line  
followed by a long line where I have typed some sort of 
nonsense 
Comment 3 Jens Dagerbo 2003-05-03 02:37:13 UTC
*** Bug 57287 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Cullmann 2003-08-06 02:04:20 UTC
What needs to be done: 
   - fix tabs (that is more a wish and beauty problem) 
   - allow to select behind end of line to allow to select textblock like 
 
     sdkfjdsklfjd 
     lk
Comment 5 Christoph Cullmann 2003-08-06 02:04:52 UTC
*** Bug 56584 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Cullmann 2003-08-10 00:43:19 UTC
block selection mode will cause wrapCursor to be off 
 
only thing needs still to be done: beautify the look, that will be wish 
Comment 7 Mathieu Jobin 2005-08-13 01:55:57 UTC
would not this be solved along with bug #56935 ??

Comment 8 Andreas Kling 2006-07-14 07:00:34 UTC
*** Bug 74918 has been marked as a duplicate of this bug. ***
Comment 9 steve 2007-03-17 02:27:45 UTC
Can we please have a fix for this bug? It's been 4 and a half years now since it was reported.
For an example of the problem, see the following image:
http://www.princeton.edu/~wglennie/grad2.png

Thanks
Comment 10 Brendon Higgins 2008-08-13 05:02:32 UTC
Block selection with tabs is still dodgy in Kate in KDE 4.1.
Comment 11 FiNeX 2009-08-07 22:07:02 UTC
Created attachment 35977 [details]
block selection with tabs

This is the right behaviour: tab is one char, like a space or a dot. It is correct that it is interpred by its meaning not by the visual space it uses on the monitor.

IMHO this bug is a worksforme.
Comment 12 Brendon Higgins 2009-08-08 02:53:55 UTC
@FiNeX: You're joking, right?

It's natural to expect block selection mode to select a rectangular block of text. This is perceptual, not conceptual.

Say you have a file with tab separate data. Assume the tab stops line up but each field may vary slightly in their widths (not uncommon in the real world). If you use block selection mode to extract a subset of that data you'd expect to be able to select from one tab stop and get a nice rectangle over the subset you want. But since the fields have different widths you cannot do that.

At *best* this is a wishlist bug for a configuration option, but it should certainly not be closed as a worksforme.
Comment 13 FiNeX 2009-08-08 12:01:06 UTC
@Brendon - I've one thought: on kate you can configure how many "spaces" display as tab width, changing that option cause the block selection to "visually" select different the text.
If you, for example, set this option to 1, the block selection visually looks like you want. If you configure it to display a tab with 10 spaces, for example, and you're selecting a colum visually into that tab (look on my next screenshot for an example), which char should be copied? 
A cutted "tab" char? Impossible...
A space? it is not the char on that place, it is incoherent...

This is why I've strong doubts on changing the current behaviour
Comment 14 FiNeX 2009-08-08 12:02:01 UTC
Created attachment 35987 [details]
mockup

Mockup of the suggested "perceptual" block selection.
Comment 15 Brendon Higgins 2009-08-08 13:19:36 UTC
Hmm, okay, that is a tricky corner case. My first thought is that it should probably copy nothing for partial tab selection. So that particular line in your mockup would copy as an empty line.

Even so, as an end user, that behaviour would make more sense and be more useful to me than the current situation.
Comment 16 Erlend Hamberg 2009-08-08 14:24:19 UTC
i agree with those who say that it should select a rectangular area. if parts of a tab is cut/deleted, the tab should be expanded to space characters and the selected space characters should be removed.
if parts of tab is selected when copying, then that should be copied as space characters.
Comment 17 Pascal Létourneau 2009-12-30 05:53:25 UTC
SVN commit 1067647 by pletourn:

Improve block selection in presence of tabs

CCBUG:52195


 M  +16 -2     document/katedocument.cpp  
 M  +2 -0      document/katedocument.h  
 M  +1 -1      document/katetextline.cpp  
 M  +4 -14     render/katerenderer.cpp  
 M  +0 -6      view/kateview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1067647
Comment 18 Dominik Haumann 2011-08-12 11:56:54 UTC
Hi, the handling has been changed now and it would be nice to get feedback again.
I'll close this report, so if issues persist, you can reopen.