Tab / Shift+Tab bug

Working on new editor enhancements?
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Tab / Shift+Tab bug

Post 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.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post 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).
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Post 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
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Yes, a bug, if the last selected character is a newline it is dropped from the selection.
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Post by Foz »

Still occurs in Linux 4.20 beta 1
Post Reply