markonm / traces.vim

Range, pattern and substitute preview for Vim
MIT License
742 stars 13 forks source link

Conflicts with the improved Ex mode #31

Closed 097115 closed 5 years ago

097115 commented 5 years ago

To reproduce:

> vim -E ~/.bash_logout
"~/.bash_logout" 7L, 174C
Entering Ex mode.  Type "visual" to go to Normal mode.
:ver
Error detected while processing CmdlineLeave Autocommands for ":":
E121: Undefined variable: s:incsearch

This would probably fix it:

plugin/traces.vim, line 97:

autocmd CmdlineLeave,CmdwinEnter : if exists("s:incsearch") | noautocmd let &incsearch = s:incsearch | endif
markonm commented 5 years ago

I cannot reproduce. What is your vim version and minimal vimrc?

097115 commented 5 years ago

It doesn't matter if you can reproduce or not: if it's possible that your variable is left unassigned, then guards are a must. Especially if your code enters the user space. Why am I, not even an amateur programmer, explaining this to a professional developer?

Anyway, this already already took twice as long as needed, so you simply don't bother, vim-plug is just fine at applying patches.