justmoon / relative-numbers

Relative line numbers package for Atom
https://atom.io/packages/relative-numbers
MIT License
37 stars 16 forks source link

Fix bug on reversed linewise selection #31

Closed t9md closed 7 years ago

t9md commented 7 years ago

When selection is reversed and linewise, relative number become incorrect. This PR simplify relative line calcuration so no longer use existing endOfLineSelected.

Before

line-number-view_coffee_ _lib_ ___github_relative-numbers

After

line-number-view_coffee_ ___github_relative-numbers
t9md commented 7 years ago

feel free to modify or close if you have any concern. I haven't deeply checked exiting behavior. I don't have strong opinion my approach is correct.

justmoon commented 7 years ago

Hmm, after applying this patch I get a regression where relative-numbers is now highlighting the line after the current one during line-wise selection if "Soft wraps count" option is enabled:

screenshot from 2017-05-10 00-12-08

t9md commented 7 years ago

I can't remember correctly any more, feel free to ignore and close this PR.

justmoon commented 7 years ago

Ok, closing for now, the issue is tracked via #21.