-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Multiline yank writes to 0 register; fixes #1214 #3087
Changes from 1 commit
7207093
e4bf55e
d97ef01
b46c8d1
d55be12
3e7adb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ export class RecordedState { | |
* The command (e.g. i, ., R, /) the user wants to run, if there is one. | ||
*/ | ||
public get command(): BaseCommand { | ||
const list = _.filter(this.actionsRun, a => a instanceof BaseCommand); | ||
const list = _.filter(this.actionsRun, a => a instanceof BaseCommand).reverse(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I could tell, this However, the comment below brought me pause:
If there is only supposed to be one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, what are your thoughts on handling this in the processNumberedRegister call instead? Changing this seems a little bit of a workaround since the get() is currently returning the stack the way it was executed (which seems OK to me) Not too sure on the TODO comment :/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, since nobody else seems to be calling That said, you know the code better than I do, so happy to do it either way in the end! Both ways will accomplish the same purpose and get this working better which is what matters 😃 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting looks like the getter for operator is reversed, lets just go with this! |
||
|
||
// TODO - disregard <Esc>, then assert this is of length 1. | ||
|
||
|
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.
Previously, this code was initializing
baseOperator
to beCommandNumber
in some cases. For example,5Y
is[CommandNumber, CommandYankFullLine]
, and becauseCommandNumber
inherits fromBaseCommand
and comes first,baseOperator
would be set to that.Then, the blocks below specifically to handle yanks wouldn't be hit.
Vim/src/actions/commands/actions.ts
Line 284 in bd153ad