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.
In 041122, I notice that if I have e.g. public static class ActionWrapper ... and I put the caret between the 'c' and ' ' after 'public', remove-word (bound by me to Ctrl-Backspace) works fine to delete 'public'. But if I have it one char later, between the ' ' and 's' of 'static', it deletes 'static' instead! This is most unexpected. It should always delete the previous word.
First time I've noticed this bug.
new behaviour since bugfix of issue #25662 in accordance with http://editor.netbeans.org/doc/UserView/apdx_a_eshortcuts.html if you have situation public |static - the word at caret offset is deleted, include the situation the caret at the begining of the word. That's why "static" is deleted. Or am I wrong? I just used Utilities.getIdentifierBlock(doc,dotPos) and the block of the word "static" was returned. in this situation public is deleted public | static Anyway, fix should be trivial...
I don't know anything about your UI spec, but every other app has one behavior for Ctrl-Backspace: it deletes the previous word. And that is what the editor used to do (if you customized the KB bindings to match normal usage), and it was fine. The new behavior is confusing. Ctrl-Delete is supposed to delete the following word, but Ctrl-Backspace is always supposed to delete the preceding word.
Aha. Actions remove-word-previous and remove-word-next are not implemented in NB. You rebinded the action remove-word to CTRL-BACKSPACE key. I would suggest to create these two missing action with correct keybindings CTRL+BACKSPACE and CRTL+DELETE. Any comments?
fixed in [maintrunk] New actions were added: remove-word-previous with binded CTRL+BACK_SPACE remove-word-next (CRTL+DELETE) behaviour of remove-word (CTRL+W) was modified. Action deletes a word the caret is on. It doesn't remove previous word Checking in libsrc/org/netbeans/editor/ActionFactory.java; /cvs/editor/libsrc/org/netbeans/editor/ActionFactory.java,v <-- ActionFactory.java new revision: 1.59; previous revision: 1.58 done Checking in libsrc/org/netbeans/editor/BaseKit.java; /cvs/editor/libsrc/org/netbeans/editor/BaseKit.java,v <-- BaseKit.java new revision: 1.125; previous revision: 1.124 done Checking in libsrc/org/netbeans/editor/Bundle.properties; /cvs/editor/libsrc/org/netbeans/editor/Bundle.properties,v <-- Bundle.properties new revision: 1.51; previous revision: 1.50 done Checking in libsrc/org/netbeans/editor/SettingsDefaults.java; /cvs/editor/libsrc/org/netbeans/editor/SettingsDefaults.java,v <-- SettingsDefaults.java new revision: 1.43; previous revision: 1.42 done Processing log script arguments... More commits to come... Checking in src/org/netbeans/modules/editor/resources/XMLs/DefaultGlobalKeyBindings.xml; /cvs/editor/src/org/netbeans/modules/editor/resources/XMLs/DefaultGlobalKeyBindings.xml,v <-- DefaultGlobalKeyBindings.xml new revision: 1.17; previous revision: 1.16 done Processing log script arguments... More commits to come... RCS file: /cvs/editor/test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions43.pass,v done Checking in test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions43.pass; /cvs/editor/test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions43.pass,v <-- testEditActions43.pass initial revision: 1.1 done RCS file: /cvs/editor/test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions44.pass,v done Checking in test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions44.pass; /cvs/editor/test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions44.pass,v <-- testEditActions44.pass initial revision: 1.1 done RCS file: /cvs/editor/test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions45.pass,v done Checking in test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions45.pass; /cvs/editor/test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions45.pass,v <-- testEditActions45.pass initial revision: 1.1 done RCS file: /cvs/editor/test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions46.pass,v done Checking in test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions46.pass; /cvs/editor/test/qa-functional/data/goldenfiles/editor_actions/EditActionsTest/testEditActions46.pass,v <-- testEditActions46.pass initial revision: 1.1 done Processing log script arguments... More commits to come... Checking in test/qa-functional/src/editor_actions/EditActionsTest.java; /cvs/editor/test/qa-functional/src/editor_actions/EditActionsTest.java,v <-- EditActionsTest.java new revision: 1.3; previous revision: 1.2 done Processing log script arguments... More commits to come... Checking in test/qa-functional/src/lib/EditorTestCase.java; /cvs/editor/test/qa-functional/src/lib/EditorTestCase.java,v <-- EditorTestCase.java new revision: 1.6; previous revision: 1.5
Much better, thanks! One minor bug in remove-word-previous which I will file separately.