Skip to content

Commit 9d1cf11

Browse files
authored
Merge 2a16454 into 071247b
2 parents 071247b + 2a16454 commit 9d1cf11

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

source/NVDAObjects/window/scintilla.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def _getCharacterOffsets(self, offset):
313313
tempOffset -= 1
314314
return [start, end]
315315

316-
def collapse(self, end: bool = False):
316+
def collapseAndMaybeMoveToNextParagraph(self, end: bool = False):
317317
"""Before collapsing to end, if no text is selected, TextInfo is expanded to line.
318318
This fixes a bug where next braille line command didn't move the cursor to the last empty line
319319
in Notepad++ documents.

source/braille.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,7 @@ def nextLine(self):
16611661
dest = dest.obj.makeTextInfo(textInfos.POSITION_FIRST)
16621662
else: # no page turn support
16631663
shouldCollapseToEnd = True
1664-
dest.collapse(shouldCollapseToEnd)
1664+
dest.collapseAndMaybeMoveToNextParagraph(shouldCollapseToEnd)
16651665
self._setCursor(dest)
16661666
_speakOnNavigatingByUnit(dest, self._getReadingUnit())
16671667

source/textInfos/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,9 @@ def collapse(self, end=False):
519519
"""
520520
raise NotImplementedError
521521

522+
def collapseAndMaybeMoveToNextParagraph(self, end: bool = False):
523+
return self.collapse(end)
524+
522525
@abstractmethod
523526
def copy(self):
524527
"""duplicates this text info object so that changes can be made to either one with out afecting the other"""

user_docs/en/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
* It is now possible to route to any braille cell on the Humanware Monarch multiline braille device, using their point and click action. (#18248)
4848
* In focus mode in web browsers, it is now possible to review and spell the labels of controls when those labels are specifically provided for accessibility; e.g. via `aria-label` or `aria-labelledby`. (#15159, @jcsteh)
4949
* It is now possible to review and spell the labels of controls in Google Chrome menus and dialogs. (#11285, @jcsteh)
50+
* Fixed behavior of `TextInfo.collapse()` - previously it was moving TextInfo to the next paragraph in some cases. (#18320, @mltony).
5051

5152
### Changes for Developers
5253

0 commit comments

Comments
 (0)