Search in NERDTree breaks status line
Closed this issue · 5 comments
After searching in NERDTree the statusline for every other window is broken: it no longer displays anything. Seems like global statusline is set to the following value:
statusline=%{exists('b:NERDTree')?b:NERDTree.root.path.str():''}
issuing a set statusline=
command fixes it, but breaks NERDTree. Re-opening it then fixes it completely.
What is happening is that NERDTree local value is used as global one after the statusline is restored. I tried to make changes to the code so that esearch only uses setlocal
, but I could not make it restore the NERDTree statusline back to what it was. Here are my modifications:
Thanks for the report.
If only global statusline option is set, local statuslines inherit the global value. I tried to fix it in fix-statusline-inheritance
branch. Please, pull it and let me know if it resolves the problem.
Thanks for a quick response! Pulled the branch. Something weird happens:
- the statusline of NERDTree is now the only statusline that gets changed while searching - this is good (all statuslines were altered previously)
- as long as I'm searching, the statuslines' text is correct
- when I stop searching - enter or escape - the statuslines get broken and show no text
- entering the search prompt again fixes the statuslines, but the cycle continues and if I leave the search prompt they get broken again
NVIM v0.4.3
Please, pull the last commit one more time. It looks like a vim bug, as the global option was restored, but not propagated to local &l:statusline
option. Should be fixed now.
With the latest commit, I no longer can reproduce this bug. Seems fixed to me
Cool! All the changes are in master.