Skip to content

[BUG] Inconsistent undo vertical selection behavior for v8.8.9 #17272

@tempdrive

Description

@tempdrive

Is there an existing issue for this?

  • I have searched the existing issues

Is the issue reproducible in Notepad++ without plugin?

  • I have tried Notepad++ without plugin

Is the issue reproducible in portable version of Notepad++?

  • I have tried portable version of Notepad++

Does the issue affect SciTE?

  • I have tried SciTE

Description of the Issue

This issue should be related to Undo & redo enhancement: restore vertical scroll position after undo & redo. (Fix #17194 )

I started to notice that when I am doing undo actions, the selection goes to completely different lines rather than staying at the restored line(s).

Steps To Reproduce

I try to describe as accurately as possible what I am doing when this issue occurs, but I am not able to consistently reproduce it:

  1. I am working with Python (.py) files
  2. The content is constantly edited and saved, and after each saving I am performing testing. The changes do sometime involve multi-line editing with vertical selection activated using the Alt key.
  3. Further changes follow, the data is saved again
  4. I regularly do undo actions as well, and sometimes once the action was restored, the cursor jumps to other location with multiple lines highlighted

Last time it happened I was trying to undo deletion of multiple lines, but as soon as the lines were restored, it jumped to an earlier location, where I was inserting space indentation for multi-line selection.

Current Behavior

The unrelated vertical selection from earlier changes is restored once the undo action for the last modification is completed.

Expected Behavior

The unrelated vertical selection from earlier changes should not be restored.

Debug Information

Notepad++ v8.8.9   (64-bit)
Build time: Dec  4 2025 - 03:34:09
Scintilla/Lexilla included: 5.5.8/5.4.6
Boost Regex included: 1_85
Path: C:\Program Files\Notepad++\notepad++.exe
Command Line: ""
Admin mode: OFF
Local Conf mode: OFF
Cloud Config: OFF
Periodic Backup: ON
Placeholders: OFF
Scintilla Rendering Mode: SC_TECHNOLOGY_DIRECTWRITE (1)
Multi-instance Mode: monoInst
asNotepad: OFF
File Status Auto-Detection: cdEnabledNew (for current file/tab only)
Dark Mode: ON
Display Info:
    primary monitor: 2560x1080, scaling 100%
    visible monitors count: 2
    installed Display Class adapters: 
        0000: Description - NVIDIA GeForce RTX 3060 Laptop GPU
        0000: DriverVersion - 32.0.15.8194
        0001: Description - Intel(R) UHD Graphics
        0001: DriverVersion - 32.0.101.7080
OS Name: Windows 10 Home (64-bit)
OS Version: 21H2
OS Build: 19044.6575
Current ANSI codepage: 1252
Plugins: none

Anything else?

No response

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