This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 134849 - Shift-Tab not working as expected
Summary: Shift-Tab not working as expected
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P4 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 57683 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-12 12:16 UTC by carentrica
Modified: 2016-07-07 07:26 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description carentrica 2008-05-12 12:16:39 UTC
The Shift-Tab key does not work as expected. Instead of back-tabbing (DELETE TAB), it always homes the cursor to the 
left-hand column.
Comment 1 Vitezslav Stejskal 2008-05-18 18:11:31 UTC
Please what version/build of Netbeans are you using? Is it reproducible with a fresh userdir (eg. use --userdir
/tmp/whatever when starting the IDE)? Thanks
Comment 2 carentrica 2008-05-18 18:45:11 UTC
I'm currently using the Hudson trunk builds: NetBeans IDE Dev (Build 20080516033120)

Yes it is reproducible from a new userdir.
Comment 3 Vitezslav Stejskal 2008-05-19 11:17:15 UTC
Ok, what files are you editing and what shortcuts profile are you using? I just tried in a dev build with .java and it
worked fine.
Comment 4 carentrica 2008-05-19 13:11:27 UTC
I'm using the default NetBeans profile. There are only 4 available. NetBeans, Eclipse, EMACS & NetBeans 5.5.
Comment 5 carentrica 2008-05-19 13:16:13 UTC
I meant to add that I'm editing both java and php files (not both at the same time), although there is a further issue 
with php in that my tab settings seem to be ignored as I only get 2 spaces per tab instead the 4 I should get. That 
has been logged as a separate issue.
Comment 6 Petr Dvorak 2008-07-09 11:22:25 UTC
Hi carentrica! Can you please try if the issue is still reproducible in 6.5M1 build? (here:
http://bits.netbeans.org/download/6.5/m1/) I did not manage to reproduce this issue, when I pressed Shift+Tab, it behave
correctly (like DELETE TAB).
Comment 7 carentrica 2008-07-09 11:43:23 UTC
It is still happening.
I've tried with Java and PHP.
Is this perhaps a Windows specific problem?
Comment 8 pribyl 2008-09-23 08:00:01 UTC
Product Version: NetBeans IDE Dev (Build 200809180201)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

I can observe this behaviour in certain situations.

1, Place the carret on an empty line, press Tab several times, then Shift+Tab -> the carret is placed back to the 
beginning of the line
2, Place the carret on non-empty line (but not in front of the first character), press Tab several times, then 
Shift+Tab -> Shift-Tab does not work at all
3, PLase the carret in front of the first character on a non-empty line and try the Tab/Shift-Tab -> in this case it 
works as expected.
Comment 9 Petr Dvorak 2008-09-23 09:36:18 UTC
OK, I see - this issue is probably about the case 1)...

Thanks for the steps, Pavel. Because actions are called TAB->"Insert Tab" and Shift+TAB->"Delete Tab", this is certainly
a defect (TAB is OK, Shift+Tab is confusing).

One more usecase - suppose you have line indented by 4 levels, place caret so that it is in the middle of this indent.
Press Shift+TAB. Line is indented by 3 levels and caret is before the first letter on the line... Now I can readily see
where the main problem/confusion comes from... ;)

Shift+Tab now behaves more like "remove indenting tab" than "remove tab", which I didn't find strange as this is the way
I use it. I find more strange to have a shortcut for deleting tab, especially when you have "Replace Tabs with Spaces"
turned on - what if you press TAB, LEFT, Shift+TAB??... Also, when "Replace Tabs with Spaces" is off, BACKSPACE does the
job of removing tab, right?

I think current behavior is as designed and the action "Delete Tab" should be renamed to "Remove Indent"...
Comment 10 Petr Dvorak 2008-09-23 09:37:04 UTC
(Pavel's step 1 is still the issue because it removes all indents on the line, which is not too handy...)
Comment 11 Vitezslav Stejskal 2008-09-29 11:14:19 UTC
*** Issue 57683 has been marked as a duplicate of this issue. ***
Comment 12 David Strupl 2009-06-08 14:03:24 UTC
Marek, these are yours now ...
Comment 13 David Strupl 2012-10-25 13:39:18 UTC
Bug prior to 7.0, not touched for the last 2 years --> P4.
Comment 14 Martin Balin 2016-07-07 07:26:54 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss