File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88from logHandler import log
99import os
1010import codecs
11+ import review
1112import api
12- import config
1313from . import dictFormatUpgrade
1414from .speechDictVars import speechDictsPath
1515
@@ -115,9 +115,25 @@ def sub(self, text):
115115 del self [index ]
116116 return text
117117
118+
118119def processText (text ):
119120 if not globalVars .speechDictionaryProcessing :
120121 return text
122+ # #14689: older (IMPROVED and END_INCLUSIVE) UIA consoles have many blank lines, which slows processing to a halt
123+ focus = api .getFocusObject ()
124+ try :
125+ # get TextInfo implementation for object review mode
126+ textInfo , obj = review .getObjectPosition (focus )
127+ except AttributeError : # no makeTextInfo
128+ textInfo = None
129+ # late import to prevent circular dependency
130+ # ConsoleUIATextInfo is used by IMPROVED and END_INCLUSIVE consoles
131+ from NVDAObjects .UIA .winConsoleUIA import ConsoleUIATextInfo
132+ if isinstance (textInfo , ConsoleUIATextInfo ):
133+ stripText = text .rstrip ()
134+ IGNORE_TRAILING_WHITESPACE_LENGTH = 100
135+ if len (text ) - len (stripText ) > IGNORE_TRAILING_WHITESPACE_LENGTH :
136+ text = stripText
121137 for type in dictTypes :
122138 text = dictionaries [type ].sub (text )
123139 return text
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ This only worked for Bluetooth Serial ports before. (#14524)
5555Instead NVDA reports that the link has no destination. (#14723)
5656- Several stability fixes to input/output for braille displays, resulting in less frequent errors and crashes of NVDA. (#14627)
5757- NVDA again recovers from many more situations such as applications that stop responding which previously caused it to freeze completely. (#14759)
58+ - When forcing UIA support with certain terminal and consoles, a bug is fixed which caused a freeze and the log file to be spammed. (#14689)
5859-
5960
6061
You can’t perform that action at this time.
0 commit comments