Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4043

    danderson
    Member

    I have noticed a few ‘quirks’ in the highlight matching parentheses/brackets functionality.

    1) When initially typing a closing bracket, the matching open bracket is highlighted when the cursor is immediately after the closing bracket. In all other cases, matching brackets are highlighted only when the cursor is located immediately before the bracket.

    2) After inserting text immediately before a closing bracket, highlighting does not work until the cursor is moved. For example, type “{}” then insert some text between the brackets. The highlighting goes away even thought the cursor is immediately before the closing bracket.

    3) No highlighting is shown if the cursor is immediately after the closing bracket. This is a little unintuitive.

    I would suggest the following change to make the behavior a little more consistent and user friendly. Highlight matching brackets when the cursor is before OR after a bracket. If the cursor is immediately adjacent to two sets of brackets (e.g. one before, one after) only highlight the inner brackets.

    e.g.

    (foo)|
    (foo|)
    ((foo)|)

    #4050

    jamesh
    Member

    3) sounds like a good idea to me.
    For other users if you don’t know the shortcut key: Ctrl+] this jumps between the opening and closing brackets and is very handy.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Share with friends... Tweet about this on TwitterShare on FacebookShare on Google+Email this to someone