Community
    • Login

    Auto-completion of brackets only works when text is isolated?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 293 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • marianogedismanM
      marianogedisman
      last edited by

      Hello everyone! I hope you’re having a good day.

      I am having some issues with Notepad++ v7.8.4 on Win10.
      Auto closing of brackets works perfect when the bracket is isolated, but as soon as it’s next to another delimitor, it seems to not recognise it.
      Same scenario works ok on Atom.
      Maybe a bug? Or it’s just the way it’s intended to work?

      Thanks in advance for your opinion!

      Notepad++
      alt text

      Atom
      alt text

      1 Reply Last reply Reply Quote 1
      • guy038G
        guy038
        last edited by guy038

        Hello, @marianogedisman and All,

        I did some tests, regarding the auto-completion feature and here are the present main rules of this mechanism :

        • If the box " or ' is ticked then, when pressing the " or ' key, the auto-completion occurs :

          • If the character before the caret belongs to class [\t\r\n\x20] and the character after the caret belongs to class [\t\r\n\x20)\\]}]

          • If the character before the caret belongs to class [(\\[{] and the character after the caret belongs to class [\t\r\n\x20]

          • If the caret is within the () or [] or {} string

        • If the box { or [ or { is ticked then, when pressing the ( or [ or { key, the auto-completion occurs :

          • Whatever the character before the caret

          • If the character after the caret belongs to the class [\t\r\n\x20)\\]}]

        • If a matched pair is ticked, then the auto-completion occurs :

          • Whatever the character before the caret

          • If the character after the caret belongs to the class [\t\r\n\x20]

          • Note that the opening and closing user boundaries, of any matched pair, must belong to the range [\x1E-\x7F] !


        Now, it seems reasonable to allow the auto-completion feature regardless of the characters before and after the caret position ! If the present behavior bothers you, I advice you to create a new issue, following these recommendations

        Best Regards

        guy038

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors