Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CursorManager._caretMovementScriptHelper: return early if another script is waiting. #17049

Merged
merged 4 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion source/cursorManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
michaelDCurran marked this conversation as resolved.
Show resolved Hide resolved
oldInfo = self.makeTextInfo(posConstant)
info = oldInfo.copy()
info.collapse(end=self.isTextSelectionAnchoredAtStart)
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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

Expand Down