man.vim: get page after opening split (#6032)

This will ensure that $MANWIDTH is correctly set.
This commit is contained in:
Anmol Sethi 2017-01-31 10:03:45 -05:00 committed by Justin M. Keyes
parent 5bcb972a88
commit 39a6f835e7

View File

@ -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