From 2ebbecef585c48a70b8b601990acf2ca8f999159 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Fri, 2 Oct 2020 18:13:18 -0400 Subject: [PATCH] Remove optimized _getTextLines for 21H1 UIA console --- source/NVDAObjects/UIA/winConsoleUIA.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/source/NVDAObjects/UIA/winConsoleUIA.py b/source/NVDAObjects/UIA/winConsoleUIA.py index ce7a4d275b4..2a328aafa44 100644 --- a/source/NVDAObjects/UIA/winConsoleUIA.py +++ b/source/NVDAObjects/UIA/winConsoleUIA.py @@ -49,10 +49,8 @@ def _getBoundingRange(self, obj, position): if position == textInfos.POSITION_FIRST: collapseToEnd = False elif position == textInfos.POSITION_LAST: - # We must pull back the end by one character otherwise when we collapse to end, - # a console bug results in a textRange covering the entire console buffer! - # Strangely the *very* last character is a special blank point - # so we never seem to miss a real character. + # The exclusive end hangs off the end of the visible ranges. + # Move back one character to remain within bounds. _rangeObj.MoveEndpointByUnit( UIAHandler.TextPatternRangeEndpoint_End, UIAHandler.NVDAUnitsToUIAUnits['character'], @@ -366,13 +364,6 @@ def _get_TextInfo(self): movement.""" return consoleUIATextInfo if self.is21H1Plus else consoleUIATextInfoPre21H1 - def _getTextLines(self): - # This override of _getTextLines takes advantage of the fact that - # the console text contains linefeeds for every line - # Thus a simple string splitlines is much faster than splitting by unit line. - ti = self.makeTextInfo(textInfos.POSITION_ALL) - text = ti.text or "" - return text.splitlines() def findExtraOverlayClasses(obj, clsList): if obj.UIAElement.cachedAutomationId == "Text Area":