diff runtime/ftplugin/man.vim @ 20025:18043e7ab449 v8.2.0568

patch 8.2.0568: the man filetype plugin overwrites the unnamed register Commit: https://github.com/vim/vim/commit/55b0fb7001ae42a58c10ad93a9157113f77a43d2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 13 14:58:37 2020 +0200 patch 8.2.0568: the man filetype plugin overwrites the unnamed register Problem: The man filetype plugin overwrites the unnamed register. Solution: Use the black hole register. (Jason Franklin)
author Bram Moolenaar <Bram@vim.org>
date Mon, 13 Apr 2020 15:00:03 +0200
parents 1908e92b02fd
children 56265f711890
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: 	2020 Apr 6
+" Last Change: 	2020 Apr 13
 
 " To make the ":Man" command available before editing a manual page, source
 " this script from your startup vimrc file.
@@ -188,7 +188,7 @@ func <SID>GetPage(cmdmods, ...)
   setl buftype=nofile noswapfile
 
   setl fdc=0 ma nofen nonu nornu
-  silent exec "norm! 1GdG"
+  %delete _
   let unsetwidth = 0
   if empty($MANWIDTH)
     let $MANWIDTH = winwidth(0)
@@ -213,10 +213,10 @@ func <SID>GetPage(cmdmods, ...)
   endif
   " Remove blank lines from top and bottom.
   while line('$') > 1 && getline(1) =~ '^\s*$'
-    silent keepj norm! ggdd
+    1delete _
   endwhile
   while line('$') > 1 && getline('$') =~ '^\s*$'
-    silent keepj norm! Gdd
+    $delete _
   endwhile
   1
   setl ft=man nomod