Fix NVDA may freeze when copying large amount of text (#11843)#11852
Merged
michaelDCurran merged 1 commit intoNov 22, 2020
Conversation
OzancanKaratas
approved these changes
Nov 22, 2020
OzancanKaratas
left a comment
Collaborator
There was a problem hiding this comment.
I tested and it looks good to me.
Contributor
|
I have tested it and the freeze does not occur anymore. So it is OK for me. I have just noticed that the number of selected characters and the number of copied characters is not exactly the same (tested on the World War I article of Wikipedia). |
michaelDCurran
approved these changes
Nov 22, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #11843
Fix-up of #9843
Summary of the issue:
Depending on the speech synthesizer in use, NVDA may freeze when attempting to report a lengthy text as it has been copied to clipboard.
Description of how this pull request fixes the issue:
As when reporting selection or clipboard content, report the number of character instead of the whole text when it exceeds a certain amount.
Clipboard reporting limits to 512. Selection reporting limits to 1024.
speech._getSelectionMessageSpeechlimits to 512 characters and simply reports "%d characters"globalCommands.script_reportClipboardTextlimits to 1024 characters and reports "The clipboard contains a large portion of text. It is %s characters long"I've thus gone the middle way: Limit to 1024 and simply report "%d characters copied to clipboard".
Testing performed:
Successfully tested #11843 STR.
Known issues with pull request:
The translatable literal "%d characters" does not meet the new standard ("{nb} characters") but I've thought re-using the existing message would spare translation efforts.
Change log entry:
I don't think this deserves a change log entry.