Bug, column marking and shift-tab does not work

Claus Pedersen

Member³
When marking an indented text with column marking and pressing Shift-Tab, the marked text used to un-indent.

This does not work in 7.1, it worked in 7.0 and also in the later 7.1 beta versions.

Please fix this as soon as possible, for me it is a frequently used feature.
 
Claus,

I can't find a "column marking" feature. I used to use a feature I'd call a guideline, that drew a line showing what column you were in, for lining up your text, but don't see that any longer.

Could you please clarify what you're doing here so we can try to recreate the problem?

Thanks,

Stew
 
I hold the Alt-key down while dragging the mouse.

This will create rectangular marked area if text that in 7.0 can be moved, indented, copied, deleted etc.
 
I never noticed that feature before! Thanks for pointing it out. :cool:

I confirm that it doesn't allow you to undent. If I TAB (to indent), it deletes the selected text. If I shift-TAB to undent, it does nothing.

Further testing gives interesting results though!

1) If I pull down the menu to Edit->Selection->Indent, it works as expected.
2) If the selected block does not include leading spaces, Edit->Selection->Undent does nothing. However, if there are spaces in the front of each line of the selected text, Undent works via the menu. But not via the keystroke (Shift-Tab).
3) The CommentLines PlugIn puts 2 dashes at the end of the last selected line.
 
Is it maybe because the "Indent" is done by using Ctrl+I, and "Un- Indent" by Ctrl+U key combinations? It all works as expected this way.
 
This does indeed seem like a Tab/Shift-Tab issue. The assigned keys (Ctrl-I, Ctrl-U) work okay.

We'll fix it.
 
Two small clarifications, just so we're all clear:

You need to explicitly assign Ctrl-I and Ctrl-U to Indent and Undent, respectively. If you leave them unassigned, they won't default to those values.

Also, my step #2 above still applies. In order to UNdent, you must have spaces selected before your text block.

Good luck Marco!
 
Stew,

I slightly disagree in your step #2, for me this is the intentional behaviour.

The point in marking an area is that a performed action will only take place inside this area (copy, delete, indent, unindent, etc.). Just like you can not unindent a normal text any further that the left margin (column 1), you cannot unindent a marked area any further than its left margin (the first column where the marking begins). Do you agree?

I always use column marking and unindent to left-align lines of code, for instance method paramters, assignments etc., therefore the unindent should never go further than the left margin of the marked area.
 
Claus,

I wasn't disagreeing (saying it SHOULDN'T work that way), just stating an observation, not a preference. I wouldn't want it overwriting text to the left if I forgot to select blanks before. I think your logic that "a performed action will only take place inside this area" is exactly right.

As I said, I never knew this Alt-Select feature existed. I always selected the entire lines and undented to line things up.
 
Back
Top