Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Select Previous (part of) Word skips linebreak #1219
When selecting the whitespace at the start of a line using the mentioned command it include the line break
Steps to Reproduce
Use the following snippet:
Invoke the "Select Previous Part of Word" command.
It selects the whitespace between foo and the start of the line
It selects the whitespace between foo and the end of the previous line
"Move back part of word" behaves correctly.
"Move back part of word" also moves past the line ending to the previous line. "Select previous part of word" selects to the position "move back part of word" moves to. There is nothing wrong with the given behavior -- in fact this is default Scintilla behavior. It counts any consecutive string of whitespace as a "word".
I disagree, it is not the behavior that you expect as an end user. At the end of the day we are targeting users and not Scintilla's technical specifications.
If I have this binding set to quickly make selections without iterating over every character (which is what the common use case would be) then for it to skip across linebreaks is an annoyance with no real purpose.
As far as I know, we'd be the only editor that had that feature. Vim, Emacs, gEdit, heck probably even notepad all have "select previous (part of) word" selecting past a newline and onto the previous line (think Ctrl+Shift+Left Arrow). I as a user would not expect something different, but that's just me. Enhancement is a better label. I'll implement it as a new command altogether.