You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Brandon Gui (Jira)" <ji...@apache.org> on 2019/08/21 18:12:00 UTC
[jira] [Created] (NETBEANS-3013) Allow positioning of cursor inside
square braces after accepting a suggestion
Brandon Gui created NETBEANS-3013:
-------------------------------------
Summary: Allow positioning of cursor inside square braces after accepting a suggestion
Key: NETBEANS-3013
URL: https://issues.apache.org/jira/browse/NETBEANS-3013
Project: NetBeans
Issue Type: Improvement
Components: cnd - Code Completion
Affects Versions: 11.1
Environment: Windows 10 1903 (10.0.18362 Build 18362). The issue is reproducible without additional installed plugins.
Reporter: Brandon Gui
Attachments: image-2019-08-22-01-48-25-283.png, image-2019-08-22-01-53-04-848.png, image-2019-08-22-01-55-48-388.png, image-2019-08-22-02-07-30-533.png
When accepting a suggestion with a left square bracket "[", the editor completes the identifier, automatically closes the bracket with a right square bracket "]" and places the cursor right outside the right square bracket. While this feature is useful, it is a nuisance when using arrays because you have to move the cursor back to enter the index.
The following GIF illustrates this:
!image-2019-08-22-01-48-25-283.png!
However, if I were to accept the suggestion with "Enter" (which I did when I entered the full name of the array, but it doesn't matter if I did), entering the braces don't cause the cursor to be positioned outside of the right brace. The following GIF illustrates this:
!image-2019-08-22-02-07-30-533.png!
A workaround to this issue is to remove the left square bracket "[" from the field of autocomplete selectors. However, hitting "[" will no longer accept suggestions, so you need to type the entire name of the array or select it from the list of suggestions manually.
!image-2019-08-22-01-53-04-848.png!
Another (not-very-good) workaround is to uncheck "Insert Closing Brackets Automatically" instead of removing the character from the completion selectors field. This allows you to accept suggestions, but you'll have to manually type in the rest, including the closing bracket. Note that this will not only affect square brackets, but also parenthesis and curly braces.
!image-2019-08-22-01-55-48-388.png!
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists