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 eval mapping when used with unnamed clipboard #41

Merged
merged 1 commit into from Nov 3, 2018

Conversation

Projects
None yet
2 participants
@emilyst
Contributor

emilyst commented Oct 31, 2018

Use same logic in scriptease#filterop as used in s:opfunc to ensure
the unnamed clipboard isn't used during the normal! gvp command.

This fixes the g= mapping when used together with set clipboard=unnamed.

@emilyst

This comment has been minimized.

Contributor

emilyst commented Oct 31, 2018

I just realized that this probably makes the logic inside of s:opfunc redundant, but I'll leave it alone in case you want to call that op from somewhere else someday? I can always amend this commit merely to move this clipboard rigmarole rather than copy it.

@tpope

This comment has been minimized.

Owner

tpope commented Oct 31, 2018

Yeah go ahead and amend it to do that please, thanks!

Fix eval mapping when used with unnamed clipboard
Move logic from `s:opfunc` to `scriptease#filterop` which ensures that
the unnamed clipboard is untouched. This allows the same logic to guard
against its use in the `normal! gvp` operation as well, and it
simplifies the `s:opfunc`, removing a redundant `try`/`finally`.

This fixes the `g=` mapping when used together with `set
clipboard=unnamed`.
@emilyst

This comment has been minimized.

Contributor

emilyst commented Nov 2, 2018

Amended the commit and changed the wording of the message. Woof, sorry this took a few for me to get back around to!

@tpope tpope merged commit c443ccb into tpope:master Nov 3, 2018

@emilyst emilyst deleted the emilyst:filter-op-works-with-unnamed-register branch Nov 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment