From 8148214d3afd07e96a80268cffe12677d1e24fa9 Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Mon, 26 Aug 2024 07:23:10 +1000 Subject: [PATCH 1/4] CursorManager._caretMovementScriptHelper: if another script is waiting, just return early without doing anything. Otherwise, scripts could become backed up and NVDA will become unresponsive. --- source/cursorManager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/cursorManager.py b/source/cursorManager.py index ea759170748..17a67f8baf4 100644 --- a/source/cursorManager.py +++ b/source/cursorManager.py @@ -18,7 +18,7 @@ import gui.contextHelp from speech import sayAll import review -from scriptHandler import willSayAllResume, script +from scriptHandler import willSayAllResume, script, isScriptWaiting import textInfos import speech import config @@ -145,6 +145,10 @@ def _caretMovementScriptHelper( extraDetail=False, handleSymbols=False, ): + if isScriptWaiting(): + # Moving / reporting is quite costly, so we don't want to do it if there are more scripts waiting. + # Otherwise, NVDA could become unusable while it processes many backed up scripts. + return oldInfo = self.makeTextInfo(posConstant) info = oldInfo.copy() info.collapse(end=self.isTextSelectionAnchoredAtStart) From 858084aec0018cb824210d1b2c6e3c49e83298f4 Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Mon, 26 Aug 2024 07:25:14 +1000 Subject: [PATCH 2/4] Update what's new --- user_docs/en/changes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/user_docs/en/changes.md b/user_docs/en/changes.md index c2fafcd3b50..74e8df5b64a 100644 --- a/user_docs/en/changes.md +++ b/user_docs/en/changes.md @@ -43,6 +43,7 @@ The available options are: * It is now possible to use braille display routing keys to move the text cursor. (#9101) * It is now possible to use the review cursor selection commands to select text. * Updating NVDA while add-on updates are pending no longer results in the add-on being removed. (#16837) +* NVDA no longer becomes unresponsive if holding down an arrow key for a long time while in NVDA browse mode, in particular Microsoft word. (#16812) ### Changes for Developers From 2d6aad775de78828301937f144ff239fdf2cb496 Mon Sep 17 00:00:00 2001 From: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:50:18 +1000 Subject: [PATCH 3/4] Update user_docs/en/changes.md --- user_docs/en/changes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_docs/en/changes.md b/user_docs/en/changes.md index 74e8df5b64a..2388e45ead3 100644 --- a/user_docs/en/changes.md +++ b/user_docs/en/changes.md @@ -43,7 +43,7 @@ The available options are: * It is now possible to use braille display routing keys to move the text cursor. (#9101) * It is now possible to use the review cursor selection commands to select text. * Updating NVDA while add-on updates are pending no longer results in the add-on being removed. (#16837) -* NVDA no longer becomes unresponsive if holding down an arrow key for a long time while in NVDA browse mode, in particular Microsoft word. (#16812) +* NVDA no longer becomes unresponsive after holding down an arrow key for a long time while in browse mode, particularly in Microsoft Word. (#16812) ### Changes for Developers From 924c4b2808209b2bde57db7f8ffb29a3c84d625e Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Mon, 26 Aug 2024 17:14:39 +1000 Subject: [PATCH 4/4] Update user_docs/en/changes.md Co-authored-by: Cyrille Bougot --- user_docs/en/changes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_docs/en/changes.md b/user_docs/en/changes.md index 2388e45ead3..9b9fc509256 100644 --- a/user_docs/en/changes.md +++ b/user_docs/en/changes.md @@ -43,7 +43,7 @@ The available options are: * It is now possible to use braille display routing keys to move the text cursor. (#9101) * It is now possible to use the review cursor selection commands to select text. * Updating NVDA while add-on updates are pending no longer results in the add-on being removed. (#16837) -* NVDA no longer becomes unresponsive after holding down an arrow key for a long time while in browse mode, particularly in Microsoft Word. (#16812) +* NVDA no longer becomes unresponsive after holding down an arrow key for a long time while in browse mode, particularly in Microsoft Word and Microsoft Outlook. (#16812) ### Changes for Developers