Skip to content

EditableText: Do not treat "\r\n" as two characters when backspace is pressed - #12379

Merged
michaelDCurran merged 1 commit into
nvaccess:masterfrom
accessolutions:i12375-backspaceNewLineScintilla
May 9, 2021
Merged

EditableText: Do not treat "\r\n" as two characters when backspace is pressed#12379
michaelDCurran merged 1 commit into
nvaccess:masterfrom
accessolutions:i12375-backspaceNewLineScintilla

Conversation

@JulienCochuyt

Copy link
Copy Markdown
Contributor

Link to issue number:

Found while investigating on #12375

Summary of the issue:

In Notepad++, when hitting backspace to delete a line break, NVDA announces "blank" instead of "new line".

The TextInfo of the Scintilla implementation may contain "\r\n" instead of "\n".
The current implementation of EditableText._backspaceScriptHelper treats it as two characters and thus fails to trigger a proper announce.

Description of how this pull request fixes the issue:

Replace "\r\n" by "\n" before further treatment of the deleted chunk.

Testing strategy:

Manually tested from a source copy with Notepad++ 7.8.7 and a bunch of other editors.

Known issues with pull request:

Change log entries:

I do not think this small fix deserves a change log entry.

Code Review Checklist:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual tests.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.

@JulienCochuyt
JulienCochuyt requested a review from a team as a code owner May 7, 2021 12:10
@michaelDCurran
michaelDCurran merged commit ef53fb5 into nvaccess:master May 9, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.1 milestone May 9, 2021
@JulienCochuyt
JulienCochuyt deleted the i12375-backspaceNewLineScintilla branch May 9, 2021 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants