Skip to content

Commit 9755f4b

Browse files
Merge 50d01ae into c595463
2 parents c595463 + 50d01ae commit 9755f4b

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

source/NVDAObjects/JAB/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,11 @@ def _getLineOffsets(self,offset):
173173
if end==-1 and offset>0:
174174
# #1892: JAB returns -1 for the end insertion position
175175
# instead of returning the offsets for the last line.
176-
# Try one character back.
177-
(start,end)=self.obj.jabContext.getAccessibleTextLineBounds(offset-1)
176+
# Try one character back, unless we're on a new line.
177+
if self.obj.jabContext.getAccessibleTextRange(offset-1, offset-1) != "\n":
178+
(start, end) = self.obj.jabContext.getAccessibleTextLineBounds(offset-1)
179+
else:
180+
(start, end) = (offset, offset)
178181
#Java gives end as the last character, not one past the last character
179182
end=end+1
180183
return (start,end)

user_docs/en/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* NVDA will announce visible candidates again when opening the Windows 11 IME interface. (#14023, @josephsl)
2929
* NVDA will no longer announce "clipboard history" twice when navigating through the emoji panel menu items. (#16532, @josephsl)
3030
* NVDA will no longer cut off speech and braille when reviewing kaomojis and symbols in the emoji panel. (#16533, @josephsl)
31+
* In applications using Java Access Bridge, NVDA will now correctly read the last blank line of a text instead of repeating the previous line. (#9376, @dmitrii-drobotov)
3132

3233
### Changes for Developers
3334

0 commit comments

Comments
 (0)