GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I think ViPasteRight needs to account for the case where the sel is at EOF to position the caret at the beginning of the last line. At the moment it incorrectly places it after EOL of the last line that existed before the paste operation.
fixes #100: pasting at EOF should create new line
Thanks for the feedback. I'm not sure how to check whether we're in visual line mode/visual characterwise selection and at the same time make yy still insert a new line when it's the last line of the buffer.
Btw, if #104 is accepted, I will have to redo this against those changes.
let key bindings notify actions about whether they should add a new n…
…ewline at eof
This last set of changes to pasting looks good. Can you submit this as a separate fix (for #117)?
I'm thinking the fix for #100 can be a lot simpler (the fix for #117 is great!) If the motion mode indicates a linewise motion/selection, ensure what's being put in the register has a trailing newline. So we don't really have to have special EOF conditions; we'll just always check that linewise yanks always have the newline.
Deprecating this patch. There will be a new series of patches addressing operations at EOF and other newline-related problems when yanking/deleting/pasting.