Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

One too many lines highlighted when whole lines are selected #74

Open
phoenixeliot opened this issue Jul 13, 2016 · 0 comments
Open

One too many lines highlighted when whole lines are selected #74

phoenixeliot opened this issue Jul 13, 2016 · 0 comments
Labels

Comments

@phoenixeliot
Copy link

phoenixeliot commented Jul 13, 2016

This is for the feature "Open on Github: File" with lines selected/highlighted.

Say you have 20 lines of text.
You put the cursor at the start of line 10, then hold shift and press down 5 times, so visually lines 10–14 are selected, but the cursor is technically on line 15 (even though it's not visible).
You then trigger "Open on Github: File".

Currently, the github URL has the line numbers #L10-L15, which includes line 15 in the highlight, even though it wasn't visually selected in the editor.

Better would probably be to not include the last line if nothing on that line is actually selected.

This occurs for me especially often because I use vim-mode, which allows selecting by whole lines, which acts identically to the repro steps I gave in terms of where the selector bounds are.

@winstliu winstliu added the bug label Jul 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants