diff options
author | Anmol Sethi <nhooyr@users.noreply.github.com> | 2017-01-31 10:03:45 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-01-31 16:03:45 +0100 |
commit | 39a6f835e779af56ade69e9eb1b4a1981e7032cd (patch) | |
tree | cbad5a8f197a96e512fc0d72a2fab0dafc75e031 | |
parent | 5bcb972a88f5b6e6d921b9209df6c60cbb7de5ba (diff) | |
download | rneovim-39a6f835e779af56ade69e9eb1b4a1981e7032cd.tar.gz rneovim-39a6f835e779af56ade69e9eb1b4a1981e7032cd.tar.bz2 rneovim-39a6f835e779af56ade69e9eb1b4a1981e7032cd.zip |
man.vim: get page after opening split (#6032)
This will ensure that $MANWIDTH is correctly set.
-rw-r--r-- | runtime/autoload/man.vim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index 5221106007..a6be00c0a9 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -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 |