mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
man.vim: get page after opening split (#6032)
This will ensure that $MANWIDTH is correctly set.
This commit is contained in:
parent
5bcb972a88
commit
39a6f835e7
@ -39,7 +39,6 @@ function! man#open_page(count, count1, mods, ...) abort
|
||||
let sect = string(a:count)
|
||||
endif
|
||||
let [sect, name, path] = s:verify_exists(sect, name)
|
||||
let page = s:get_page(path)
|
||||
catch
|
||||
call s:error(v:exception)
|
||||
return
|
||||
@ -52,6 +51,15 @@ function! man#open_page(count, count1, mods, ...) abort
|
||||
else
|
||||
noautocmd execute 'silent' a:mods 'split' fnameescape(bufname)
|
||||
endif
|
||||
|
||||
try
|
||||
let page = s:get_page(path)
|
||||
catch
|
||||
close
|
||||
call s:error(v:exception)
|
||||
return
|
||||
endtry
|
||||
|
||||
let b:man_sect = sect
|
||||
call s:put_page(page)
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user