diff options
author | George Brown <321.george@gmail.com> | 2016-02-01 00:39:24 -0600 |
---|---|---|
committer | George Brown <321.george@gmail.com> | 2016-02-01 00:39:24 -0600 |
commit | 948361760cec2b3d570cf11af98df368bac8c514 (patch) | |
tree | 0cf7966256052bc1fbbc0bd6df521d132a66f654 | |
parent | 8f22031708b351ec5bb73952e6afc39b07a72ae2 (diff) | |
download | rneovim-948361760cec2b3d570cf11af98df368bac8c514.tar.gz rneovim-948361760cec2b3d570cf11af98df368bac8c514.tar.bz2 rneovim-948361760cec2b3d570cf11af98df368bac8c514.zip |
Respect $MANWIDTH
If $MANWIDTH is set do not override it otherwise use winwidth.
-rw-r--r-- | runtime/autoload/man.vim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index d481d9eaf0..49663d7e5a 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -75,7 +75,9 @@ function man#get_page(...) abort setlocal modifiable silent keepjumps norm! 1G"_dG - let $MANWIDTH = winwidth(0) + if empty($MANWIDTH) + let $MANWIDTH = winwidth(0) + endif silent exec 'r!/usr/bin/man '.s:cmd(sect, page).' | col -b' " Remove blank lines from top and bottom. while getline(1) =~ '^\s*$' |