Skip to content

Column tracking after brace matching is wrong #13433

@alankilborn

Description

@alankilborn

Description of the Issue

When you use the brace-matching function, your caret is moved to the matching brace. When you then move the caret up or down a line (with arrow key), the caret moves to an unexpected column on the destination line.

Steps to Reproduce the Issue

  1. Create a new tab and set its Language to Python
  2. Paste this text:
                                           #
find_msg_cracker_dict = {
                                           #
}
                                           #
  1. Place the caret next to the opening brace:
    image
  2. Use Ctrl+b to move the caret to the closing brace:
    image
  3. Press the down arrow key one time.

Expected Behavior

I expected the caret to be in column 1 of the destination line:
image

Actual Behavior

Caret placed oddly:
image

Debug Information

Notepad++ v8.5.1 (64-bit)
Build time : Mar 21 2023 - 19:16:10
Path : W:\npp.misc_NoBackup\Releases\npp.8.5.1\npp.8.5.1.portable.x64\notepad++.exe
Command Line : -titleAdd="8.5.1 64-bit" -multiInst "W:\Temp\Temp\20230327-165700_.py" -n5
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 21H2
OS Build : 19044.2604
Current ANSI codepage : 1252
Plugins :
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions