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

Retry au * * autocmd if in cmd line and it throws E1155 #35

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

mckellygit
Copy link
Contributor

See issue #33
Code change discussed with @bruno-
thx,
-m

@mckellygit
Copy link
Contributor Author

I added a redraw! if it threw, because without this nvim doesn't display anything until you exit the cmdline or esc.

@bruno- bruno- merged commit 9cb40a1 into tmux-plugins:master Mar 1, 2021
@mckellygit
Copy link
Contributor Author

mckellygit commented Mar 1, 2021

@bruno- I think we need to re-think this. If I get into this situation by typing / too quickly then the autocmd never works and the retry loop just keeps retrying forever. For vim, not nvim I think.
Perhaps I can check v:vim_did_enter or something ? I will work on it today.
Until this is solved properly I think this change should be reverted, sorry.

@mckellygit
Copy link
Contributor Author

mckellygit commented Mar 1, 2021

Do we need to autocmd * here ? Or would CmdLineEnter,CmdLineChanged work ? It seems an autocmd is added and then in the delayed_checktime() the autocmd is removed ? Is that right ? Why that instead of just calling delayed_checktime() or just checktime inside a try/catch ?

@mckellygit
Copy link
Contributor Author

mckellygit commented Mar 2, 2021

The vim help shows -

:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
			Add {cmd} to the list of commands that Vim will
			execute automatically on {event} for a file matching
			{pat} |autocmd-patterns|. 
			Here {event} cannot be "*".  *E1155*

So for vim we cannot use autocmd * * ...

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

Successfully merging this pull request may close these issues.

2 participants