Switch.vim pollutes search history
Closed this issue · 2 comments
tankorsmash commented
When toggling true
to false
in C++, I get
\%>33c\Ctrue\m\%<39c
in my search history, while .
to ->
results in
\%>4c\(\k\+\)->\m\%<17c
I think the solution is to use call search("pattern")
, instead of using /
but I couldn't find the slash in the source to change, so this is probably something different
AndrewRadev commented
It's not a search, not directly -- it's executing :s/<pattern>/<replacement>
-- that one also adds entries to the search history.
In any case, it's a good catch -- you're right that it shouldn't add anything to the search history, that really needs to be a hidden implementation detail. I've made a change that should fix this. Could you try it out?
tankorsmash commented
Awesome man, it works great! Consider this resolved!