diff runtime/ftplugin/man.vim @ 15640:7cfe57329284

Updated runtime files. commit https://github.com/vim/vim/commit/2a953fcf107d24229fec8af820ee62c908caafbf Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 26 17:41:47 2019 +0100 Updated runtime files.
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Jan 2019 17:45:13 +0100
parents 2f7e67dd088c
children d2a834aa7cc0
line wrap: on
line diff
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:	man
 " Maintainer:	SungHyun Nam <goweol@gmail.com>
-" Last Change: 	2018 Jul 25
+" Last Change: 	2019 Jan 22
 
 " To make the ":Man" command available before editing a manual page, source
 " this script from your startup vimrc file.
@@ -206,10 +206,10 @@ func <SID>GetPage(cmdmods, ...)
     let $MANWIDTH = ''
   endif
   " Remove blank lines from top and bottom.
-  while getline(1) =~ '^\s*$'
+  while line('$') > 1 && getline(1) =~ '^\s*$'
     silent keepj norm! ggdd
   endwhile
-  while getline('$') =~ '^\s*$'
+  while line('$') > 1 && getline('$') =~ '^\s*$'
     silent keepj norm! Gdd
   endwhile
   1