Your message dated Sun, 19 Jun 2016 13:06:40 -0400
with message-id <[email protected]>
has caused the   report #827634,
regarding ftplugin/man.vim: Does not handle window narrower than terminal width
to be marked as having been forwarded to the upstream software
author(s) SungHyun Nam <[email protected]>

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
827634: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827634
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Currently, man.vim lets $MANWIDTH, if it is empty, to the width of
the window at that time.  If :Man is later called in a different sized
window, the results will look wrong.

The attached patch lets $MANWIDTH to an empty value after running man,
if it was empty to start with.  This restores the state of $MANWIDTH, so
the width will be updated the next time :Man is used.

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB
diff --git i/runtime/ftplugin/man.vim w/runtime/ftplugin/man.vim
index 43f343a..3698a39 100644
--- i/runtime/ftplugin/man.vim
+++ w/runtime/ftplugin/man.vim
@@ -160,10 +160,15 @@ func <SID>GetPage(...)
 
   setl ma nonu nornu nofen
   silent exec "norm 1GdG"
+  let unsetwidth = 0
   if empty($MANWIDTH)
     let $MANWIDTH = winwidth(0)
+    let unsetwidth = 1
   endif
   silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"
+  if unsetwidth
+    let $MANWIDTH = ''
+  endif
   " Remove blank lines from top and bottom.
   while getline(1) =~ '^\s*$'
     silent keepj norm ggdd

--- End Message ---

Reply via email to