Skip to content

No longer treat spaces as separate words when using text review commands in Scintilla based editors#10008

Merged
michaelDCurran merged 8 commits into
nvaccess:masterfrom
lukaszgo1:I8295
Sep 8, 2019
Merged

No longer treat spaces as separate words when using text review commands in Scintilla based editors#10008
michaelDCurran merged 8 commits into
nvaccess:masterfrom
lukaszgo1:I8295

Conversation

@lukaszgo1

@lukaszgo1 lukaszgo1 commented Jul 31, 2019

Copy link
Copy Markdown
Contributor

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++.

@lukaszgo1

Copy link
Copy Markdown
Contributor Author

@LeonarddeR Would you be able to take a look at this? Is it a right approach?

@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit 2a7a7363ef

@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit ad7016e507

@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit 092fb8352c

@LeonarddeR

LeonarddeR commented Aug 5, 2019

Copy link
Copy Markdown
Collaborator

Have you tested this with more than one space in a row? e.g.

hello how are you?
another test case

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.

@lukaszgo1

Copy link
Copy Markdown
Contributor Author

@LeonarddeR wrote:

Have you tested this with more than one space in a row?

Yes, it skips through all of them. Ctrl+ arrows does the same, so I believe it is ok.

Also, how about non breaking space? \xa0?

With the following example

This is A second test
'this is' is considered a one word. The same happens when moving with Ctrl+arrows, so in my view it should remain that way. It makes it pretty clear that the space is non breaking one.

@michaelDCurran michaelDCurran changed the title No longer thread spaces as a separate words when using text review commands in Scintilla based editors No longer treat spaces as separate words when using text review commands in Scintilla based editors Sep 8, 2019
@michaelDCurran michaelDCurran merged commit 39dd2aa into nvaccess:master Sep 8, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Sep 8, 2019
michaelDCurran added a commit that referenced this pull request Sep 8, 2019
@lukaszgo1 lukaszgo1 deleted the I8295 branch September 23, 2019 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When moving by words with text review commands in Scintilla based editors NVDA treats spaces as separate words

5 participants