Skip to content

TextInfo.collapse(end=True) moves textInfo to the next paragraph in Notepad++ #18320

@mltony

Description

@mltony

Steps to reproduce:

  1. Open Notepad++. Enter any text and put the cursor at the very front (offset=0). Make sure nothing is selected.
  2. Press NVDA+Control+Z to open Python console.
  3. Type:
t=focus.makeTextInfo('selection');t.collapse(end=True);t._startOffset, t._endOffset

Actual behavior:

In the console you see something like:

(78, 78)

Which indicateds that calling collapse() moves TextInfo. In fact, textInfo appears to be moved to the next paragraph.

Expected behavior:

A call to TextInfo.collapse() should not move textInfo. As the name suggests it should only collapse. So I would expect to see the follwoing output in the console:

(0, 0)

NVDA logs, crash dumps and other attachments:

N/A

System configuration

NVDA installed/portable/running from source:

N/A

NVDA version:

2025.1

Windows version:

Windows 11

Name and version of other software in use when reproducing the issue:

N/A

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Root cause commit: 70cd311.
CC Author: @nvdaes

If NVDA add-ons are disabled, is your problem still occurring?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/regressioncomponent/braillep3https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions