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

Select Previous (part of) Word skips linebreak #1219

Closed
Naatan opened this Issue Apr 5, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@Naatan
Member

Naatan commented Apr 5, 2016

Short Summary

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:

foo
    |foo

Invoke the "Select Previous Part of Word" command.

Expected results

It selects the whitespace between foo and the start of the line

Actual results

It selects the whitespace between foo and the end of the previous line

Additional Information

"Move back part of word" behaves correctly.

@Naatan Naatan added the Type: Bug label Apr 5, 2016

@Naatan Naatan added this to the 10.1 milestone Apr 5, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jun 16, 2016

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

@Naatan

This comment has been minimized.

Member

Naatan commented Jun 16, 2016

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.

@Naatan Naatan reopened this Jun 16, 2016

@Naatan Naatan added Type: Enhancement and removed Type: Bug labels Jun 16, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jun 16, 2016

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.

@Naatan

This comment has been minimized.

Member

Naatan commented Jun 16, 2016

That's a good compromise. I have not tested many different editors, but I know Sublime for one uses the behavior I'm advocating, and it is also an editor that seems to be well liked for it's editing UX.

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jun 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment