mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
fix(man.vim): ensure buftype=nofile after :tag or :stag #15675
Problem: `buftype=help` occasionally propagates from help to man buffer. As a result the next time you open help it opens in the man window, replacing the manpage. Test case: nvim -u NORC :Man man :set bt? " should print `buftype=nofile` :help <C-W><C-W><C-W>c " go back to :Man window and close it :help " focus help window :Man man " open window with manpage again :set bt? " prints `buftype=help` Solution: - call s:set_options() - man#read_page() (called by autocmd BufReadCmd man://*) should already do this. But BufReadCmd doesn't fire for already-existing man:// buffers. Fix #15650
This commit is contained in:
parent
685cf39813
commit
29bc648d2b
@ -58,6 +58,7 @@ function! man#open_page(count, mods, ...) abort
|
||||
else
|
||||
execute 'silent keepalt' a:mods 'stag' l:target
|
||||
endif
|
||||
call s:set_options(v:false)
|
||||
finally
|
||||
call setbufvar(l:buf, '&tagfunc', l:save_tfu)
|
||||
endtry
|
||||
|
Loading…
Reference in New Issue
Block a user