Repository navigation
V2 of refactor LiveText to use diff-match-patch #11639
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
Merged
Merged
Changes from 56 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
8b1ff14
Refactor LiveText to use diff-match-patch via IPC with a C++ process.
codeofdusk bddf453
Explain magic numbers.
codeofdusk 59cfbb5
switch to a Python implementation of nvda_dmp. This commit definitely…
codeofdusk 816ea00
Compile nvda_dmp as an exe.
codeofdusk 74ac3b3
Move import.
codeofdusk 7bc466e
Uniformize ends of inserted chunks.
codeofdusk 1e4b3f4
s/available/supported in config, for consistency with rest of code an…
codeofdusk 917a903
Add diffing algorithm to devInfo.
codeofdusk 5fbe33d
Fix docs/comments
codeofdusk 998c851
Switch to a submodule.
codeofdusk a7abf02
Fix source copies.
codeofdusk f12e2ba
Use absolute path to nvda_dmp.
codeofdusk ba42885
Allow NVDA to still function if a component changes the current direc…
michaelDCurran 430f24d
Merge branch 'master' into livetext-dmp-cpp
codeofdusk 6850cb1
Merge branch 'master' of https://github.com/nvaccess/nvda
codeofdusk fec7cdf
Merge branch 'master' into livetext-dmp-cpp
codeofdusk 03b4eb9
Add comment.
codeofdusk 5f18189
Update build script pythonpath.
codeofdusk 834e698
Move import
codeofdusk 74c418f
Address review actions.
codeofdusk 114ab85
Don't restrict DMP setting to 1607+.
codeofdusk e58a0d3
Update user guide to clarify availability.
codeofdusk 4140003
Move to a class-based approach.
codeofdusk 46eccea
Change the DMP setting to a three-way option.
codeofdusk 0b3c59f
Add logging, update comment.
codeofdusk ec879e6
Fix one last comment.
codeofdusk 6fd1fbe
Address review actions.
codeofdusk 9b6761d
Review actions.
codeofdusk 561ef04
Add docstrings.
codeofdusk efba5d1
Change UI to show actual diff algorithms.
codeofdusk 139d345
Review actions.
codeofdusk 250841e
Update source/diffHandler.py
codeofdusk abfb69f
Remove prefer.
codeofdusk 63aae02
Fix accelerator.
codeofdusk 9d52372
Merge branch 'master' into livetext-dmp-cpp
codeofdusk eb32b26
Centralize config check.
codeofdusk 8438518
Update user guide.
codeofdusk 3fa0b39
Re-centralize _get_diffAlgo on the LiveText object, but add a compreh…
codeofdusk f119840
Update nvda_dmp.
codeofdusk a4a6ec5
Cleanup.
codeofdusk ecf2967
s/prefer/allow
codeofdusk 4e1aceb
Move config check.
codeofdusk 094244c
Merge branch 'master' into livetext-dmp-cpp
codeofdusk 25e2810
Review actions.
codeofdusk 4190423
Merge branch 'master' into livetext-dmp-cpp
codeofdusk f0a0141
Review actions.
codeofdusk 9b53399
Sync.
codeofdusk a89a4fe
Update user_docs/en/userGuide.t2t
codeofdusk 279cbd4
Remove unneeded type checks in legacy console.
codeofdusk bfc85e7
Fix comments.
codeofdusk afb4a76
Review actions.
codeofdusk 71da66a
Review actions.
codeofdusk 2174191
Review actions.
codeofdusk 1eecdfb
Wait for NVDA_dmp to exit, and throw an exception if it doesn't withi…
codeofdusk 578ab7d
Don't set _proc to None on termination, so that _initialize cannot be…
codeofdusk 47b0c13
Review action.
codeofdusk b4f65fe
Remove _getTextLines entirely, as this PR has been retargetted for 20…
codeofdusk dbd8ad8
Merge branch 'master' into livetext-dmp-cpp
codeofdusk 16db1a9
Merge branch 'master' into livetext-dmp-cpp
codeofdusk 7a8d579
Update user guide (s/2020.4/2021.1) as PR was held back.
codeofdusk d890ac9
Merge remote-tracking branch 'origin/master' into livetext-dmp-cpp
feerrenrut 78e4012
update changes file for PR #11639
feerrenrut File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,45 @@ | ||
| #NVDAObjects/IAccessible/WinConsole.py | ||
| #A part of NonVisual Desktop Access (NVDA) | ||
| #This file is covered by the GNU General Public License. | ||
| #See the file COPYING for more details. | ||
| #Copyright (C) 2007-2019 NV Access Limited, Bill Dengler | ||
| # A part of NonVisual Desktop Access (NVDA) | ||
| # This file is covered by the GNU General Public License. | ||
| # See the file COPYING for more details. | ||
| # Copyright (C) 2007-2020 NV Access Limited, Bill Dengler | ||
|
|
||
| import config | ||
|
|
||
| from NVDAObjects.behaviors import KeyboardHandlerBasedTypedCharSupport | ||
| from winVersion import isWin10 | ||
|
|
||
| from . import IAccessible | ||
| from ..window import winConsole | ||
|
|
||
| class WinConsole(winConsole.WinConsole, IAccessible): | ||
| "The legacy console implementation for situations where UIA isn't supported." | ||
| pass | ||
|
|
||
| class EnhancedLegacyWinConsole(KeyboardHandlerBasedTypedCharSupport, winConsole.WinConsole, IAccessible): | ||
| """ | ||
| A hybrid approach to console access, using legacy APIs to read output | ||
| and KeyboardHandlerBasedTypedCharSupport for input. | ||
| """ | ||
| #: Legacy consoles take quite a while to send textChange events. | ||
| #: This significantly impacts typing performance, so don't queue chars. | ||
| _supportsTextChange = False | ||
|
|
||
|
|
||
| class LegacyWinConsole(winConsole.WinConsole, IAccessible): | ||
| """ | ||
| NVDA's original console support, used by default on Windows versions | ||
| before 1607. | ||
| """ | ||
|
|
||
| def _get_diffAlgo(self): | ||
| # Non-enhanced legacy consoles use caret proximity to detect | ||
| # typed/deleted text. | ||
| # Single-character changes are not reported as | ||
| # they are confused for typed characters. | ||
| # Force difflib to keep meaningful edit reporting in these consoles. | ||
| from diffHandler import get_difflib_algo | ||
| return get_difflib_algo() | ||
|
|
||
|
|
||
| def findExtraOverlayClasses(obj, clsList): | ||
| if isWin10(1607) and config.conf['terminals']['keyboardSupportInLegacy']: | ||
| from NVDAObjects.behaviors import KeyboardHandlerBasedTypedCharSupport | ||
| clsList.append(KeyboardHandlerBasedTypedCharSupport) | ||
| clsList.append(WinConsole) | ||
| clsList.append(EnhancedLegacyWinConsole) | ||
| else: | ||
| clsList.append(LegacyWinConsole) |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.