Skip to content
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

Fixes #1594: <Copy> drops the first and last line when selecting in visual line mode from the bottom up #1604

Merged
merged 1 commit into from
Apr 29, 2017

Conversation

Chillee
Copy link
Member

@Chillee Chillee commented Apr 29, 2017

Another pretty simple bug fix.

start is not necessarily before stop in visual mode (start is where the cursor is currently, and stop is the "stop" of your selection).

@johnfn
Copy link
Member

johnfn commented Apr 29, 2017

Ah, very nicely done. You even used my EarlierOf and LaterOf idioms. I'm so happy!

@johnfn johnfn merged commit 8e347eb into VSCodeVim:master Apr 29, 2017
@Chillee
Copy link
Member Author

Chillee commented Apr 29, 2017

Haha are they not commonly used by other people?

It was either that or have two if statements, and I was like "oh! This is exactly what I was looking for." Maybe we should have a function that takes in two positions and returns a tuple of them in sorted order?

@johnfn
Copy link
Member

johnfn commented Apr 29, 2017

Haha - the number of times I/other contributors have reinvented various wheels in this repository is probably embarrassingly high for all of us. 😁

Your tuple solution sounds great too. Honestly, it probably even exists somewhere. 😉

@Chillee Chillee changed the title Fixes #1594 Fixes #1594: <Copy> drops the first and last line when selecting in visual line mode from the bottom up May 2, 2017
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.

2 participants