No longer treat spaces as separate words when using text review commands in Scintilla based editors#10008
Conversation
…mmands in Scintilla based editors. Fix for nvaccess#8295
|
@LeonarddeR Would you be able to take a look at this? Is it a right approach? |
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit 2a7a7363ef |
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit ad7016e507 |
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit 092fb8352c |
|
Have you tested this with more than one space in a row? e.g.
Also, how about non breaking space? \xa0? Update: note that github seems to strip spaces in the issue, they are still present in my comment's body. |
|
@LeonarddeR wrote:
Yes, it skips through all of them. Ctrl+ arrows does the same, so I believe it is ok.
With the following example This is A second test |
Link to issue number:
Fixes #8295
Summary of the issue:
When moving between words in object review in Scintilla controls spaces are treated as separate words. This makes object review in these controls really inefficient. Additionally text review navigation works differently than navigating with Ctrl+arrows.
Description of how this pull request fixes the issue:
Because SCI_WORDSTARTPOSITION and SCI_WORDENDPOSITION are considering white spaces to be words check if character at offset is space, and if it is calculate these offsets again. I've also converted copyright header to the format which is accepted by Flake i,e. spaces after every #.
Testing performed:
Tested that navigation with both Ctrl+arrows and with text review commands work in the same way in Notepad++ and in TeXnicCenter which is also Scintilla based. As it uses old version of Scintilla I am quite confident that it will work with most editors.
Known issues with pull request:
None
Change log entry:
Section: Bug fixes
NVDA no longer threats spaces as a words in object review in Scintilla based editors such as Notepad++.