From 4ca9f365420e86693f1c68dc66adef80aae74ecf Mon Sep 17 00:00:00 2001 From: James Teh Date: Thu, 28 Jul 2011 11:50:31 +1000 Subject: [PATCH] MSHTMLTextInfo.move: When moving backwards, expand to character first, as it seems to correct things when at the end of the line. Fixes backspacing at the end of the line. Fixes #1605. --- source/NVDAObjects/IAccessible/MSHTML.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/NVDAObjects/IAccessible/MSHTML.py b/source/NVDAObjects/IAccessible/MSHTML.py index cfa8ec969..aefbf7e64 100644 --- a/source/NVDAObjects/IAccessible/MSHTML.py +++ b/source/NVDAObjects/IAccessible/MSHTML.py @@ -280,6 +280,11 @@ class MSHTMLTextInfo(textInfos.TextInfo): moveFunc=self._rangeObj.moveEnd else: moveFunc=self._rangeObj.move + if direction<0: + # #1605: If at the end of a line, moving back seems to land on a blank unit, + # which breaks backspacing. + # Expanding first seems to fix this. + self._rangeObj.expand("character") res=moveFunc(unit,direction) return res -- 2.11.0