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
[Fix] p in visual-mode should update register content #2602
Conversation
Travis tests have failedHey @tyru, Node.js: 8if [[ $(git diff-index HEAD --) ]]; then git diff; echo "Prettier Failed. Run `gulp` or `gulp forceprettier`"; exit 1; fi
|
4f9f1c1
to
fb9d432
Compare
test/mode/modeVisualLine.test.ts
Outdated
title: 'Vp updates register content', | ||
start: ['|hello', 'world'], | ||
keysPressed: 'ddVpP', | ||
end: ['|world', 'hello', ''], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment here mentioning that this test is actually not truly "correct"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done :)
What this PR does / why we need it
This PR fixes
p
command to update register content, when it is executed in visual-mode.Please see #1991 for the original Vim's behavior.
NOTE: this PR only fix to update register content.
p
command is yet not Vim compatible behavior.For example, the buffer content is:
And cursor position is line 1, and type
ddVpP
results in:Unnecessary newline at the end.
Expected is:
But this is another problem.
I will fix it later at the another PR.
Which issue(s) this PR fixes
Fixes #1991