Page 1 of 1

Tab / Shift+Tab bug

Posted: Fri Nov 16, 2007 10:17 pm
by Foz
One key press, two problems depending on Windows or Linux. (Mac unknown)

Here's is what I'm doing. Move the cursor to the beginning of the line, press shift and the down arrow to select the entire line.

Press Tab or Shift+Tab and it correctly changes the indents.
Press Tab or Shift+Tab again.

Now, here's where it differs:
Linux: The entire line is removed.
Windows: The selection is removed and the cursor jumps to the end of the line.

Now to throw mud on a clear bug, if you select two or more lines, it works as expected. HUH?

As a slight alternative to the above, if you select the line by going to the end of the line instead of pressing down, the same bug occurs on the FIRST indent change.

Could this be fixed please? It's very annoying to keep pressing Undo after every indent.

Posted: Sat Nov 17, 2007 8:44 am
by DoubleDutch
I think that this may be the desired behaviour for tab/shift tab.

It should only to the automatic indent/un-indent if 2 or more lines are selected. If only one line is selected it should do the default behaviour for the OS it's running on. Which would be to replace what is highlighted by what the key press is (on windows).

Posted: Sat Nov 17, 2007 9:05 am
by Foz
Nope, not a windows trait:
On Linux it removes the line.
On windows, it removes the highlight and moves the cursor to the end of the line.

I understand removing the code if you select the line but cursor moving to the end of the line, but surely when you press down, it should work the same as multiple rows.

That's my 2 pence anyway

Posted: Sat Nov 17, 2007 3:05 pm
by Trond
Yes, a bug, if the last selected character is a newline it is dropped from the selection.

Posted: Thu Jan 31, 2008 8:42 pm
by Foz
Still occurs in Linux 4.20 beta 1