From 0837ce2f0f7c40a2bc856ef78e47441fc2edc127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Golonka?= Date: Mon, 1 Aug 2022 18:27:19 +0200 Subject: [PATCH 1/2] Use line as a unit for which say all is moved in rich edit controls --- source/NVDAObjects/window/edit.py | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/source/NVDAObjects/window/edit.py b/source/NVDAObjects/window/edit.py index 58adb4585fe..090a06ad62c 100644 --- a/source/NVDAObjects/window/edit.py +++ b/source/NVDAObjects/window/edit.py @@ -3,38 +3,30 @@ # This file is covered by the GNU General Public License. # See the file COPYING for more details. -import locale from typing import ( Dict, Optional, ) import comtypes.client -import struct import ctypes from comtypes import COMError import oleTypes import colors -import globalVars import NVDAHelper import eventHandler import comInterfaces.tom from logHandler import log import languageHandler import config -import speech import winKernel import api import winUser import textInfos.offsets -from keyboardHandler import KeyboardInputGesture -from scriptHandler import isScriptWaiting import controlTypes from controlTypes import TextPosition from . import Window -from .. import NVDAObjectTextInfo from ..behaviors import EditableTextWithAutoSelectDetection -import braille import watchdog import locationHelper import textUtils @@ -465,16 +457,17 @@ def _getParagraphOffsets(self,offset): comInterfaces.tom.tomStory:textInfos.UNIT_STORY, } -NVDAUnitsToITextDocumentUnits={ - textInfos.UNIT_CHARACTER:comInterfaces.tom.tomCharacter, - textInfos.UNIT_WORD:comInterfaces.tom.tomWord, - textInfos.UNIT_LINE:comInterfaces.tom.tomLine, - textInfos.UNIT_SENTENCE:comInterfaces.tom.tomSentence, - textInfos.UNIT_PARAGRAPH:comInterfaces.tom.tomParagraph, - textInfos.UNIT_STORY:comInterfaces.tom.tomStory, - textInfos.UNIT_READINGCHUNK:comInterfaces.tom.tomSentence, +NVDAUnitsToITextDocumentUnits: Dict[str, int] = { + textInfos.UNIT_CHARACTER: comInterfaces.tom.tomCharacter, + textInfos.UNIT_WORD: comInterfaces.tom.tomWord, + textInfos.UNIT_LINE: comInterfaces.tom.tomLine, + textInfos.UNIT_SENTENCE: comInterfaces.tom.tomSentence, + textInfos.UNIT_PARAGRAPH: comInterfaces.tom.tomParagraph, + textInfos.UNIT_STORY: comInterfaces.tom.tomStory, + textInfos.UNIT_READINGCHUNK: comInterfaces.tom.tomLine, } + class ITextDocumentTextInfo(textInfos.TextInfo): def _get_pointAtStart(self): From 3288f67083b03f113eece4867e616aaf3205df3f Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Tue, 2 Aug 2022 09:56:19 +1000 Subject: [PATCH 2/2] update changes --- user_docs/en/changes.t2t | 1 + 1 file changed, 1 insertion(+) diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index 5eab5c876a2..1728a6276e9 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -14,6 +14,7 @@ What's New in NVDA == Bug Fixes == - When updating NVDA using the Windows Package Manager CLI (aka winget), a released version of NVDA is no longer always treated as newer than whatever alpha version is installed. (#12469) - NVDA will now correctly announce Group boxes in Java applications. (#13962) +- Caret properly follows spoken text in say all in applications such as Bookworm, WordPad, or the NVDA log viewer. (#13420, #9179) -