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

Status messages turn into stack traces. #38

Open
orlp opened this issue Jan 28, 2015 · 3 comments
Open

Status messages turn into stack traces. #38

orlp opened this issue Jan 28, 2015 · 3 comments

Comments

@orlp
Copy link
Contributor

orlp commented Jan 28, 2015

Let's say we entered a non-existing pattern and press n. This produces a simple clean status message:

E486: Pattern not found: \vfoobar

However if we'd do the same through vim-repeat (:call repeat#set("n")<CR>.) we get an ugly stack trace:

Error detected while processing function repeat#run:
line   17:
E486: Pattern not found: \vfoobar
Press ENTER or type command to continue

Reproduction steps:

$ wget https://raw.githubusercontent.com/tpope/vim-repeat/master/autoload/repeat.vim
$ vim -u NONE
:set nocompatible
:source repeat.vim
/foobar
:call repeat#set("n")
.
@tpope
Copy link
Owner

tpope commented Jan 28, 2015

n is a motion, not a change. . would never repeat an n on its own. Why are you passing it to repeat#set()?

@orlp
Copy link
Contributor Author

orlp commented Jan 28, 2015

This is a minimalized example. I stumbled upon this because I am using n within a bigger mapping that changes the match the cursor is on and move to the next match, or moves to the next match if the cursor is currently not on a match and do nothing else. This is a demo:

quick-replace demo

This is a regression by the way, for example vim-repeat at this commit didn't have this issue. I haven't confirmed yet whether this is the latest commit where it worked properly, still working on narrowing it down.

@orlp
Copy link
Contributor Author

orlp commented Jan 28, 2015

I did some more experimenting, and it seems that this commit introduced this bug.

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

No branches or pull requests

2 participants