summaryrefslogtreecommitdiffstats
path: root/runtime/plugin
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-06-06 20:52:59 +0100
committerBram Moolenaar <Bram@vim.org>2022-06-06 20:52:59 +0100
commit016188fd8a30cfbaca3faa0daea9a47138dc5c4b (patch)
tree5c04e35f0054ca6c3d7276e76a0ef4a494e890e2 /runtime/plugin
parent3760bfddc414e4d3e1c4203db8c22e293cf08d09 (diff)
Update runtime files.
Diffstat (limited to 'runtime/plugin')
-rw-r--r--runtime/plugin/manpager.vim11
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/plugin/manpager.vim b/runtime/plugin/manpager.vim
index 13cba5ee39..6989bee494 100644
--- a/runtime/plugin/manpager.vim
+++ b/runtime/plugin/manpager.vim
@@ -1,11 +1,14 @@
" Vim plugin for using Vim as manpager.
" Maintainer: Enno Nagel <ennonagel+vim@gmail.com>
-" Last Change: 2020 Aug 05
+" Last Change: 2022 Jun 05
command! -nargs=0 MANPAGER call s:ManPager() | delcommand MANPAGER
-function! s:ManPager()
- set nocompatible
+function s:ManPager()
+ " global options, keep these to a minimum to avoid side effects
+ if &compatible
+ set nocompatible
+ endif
if exists('+viminfofile')
set viminfofile=NONE
endif
@@ -27,7 +30,7 @@ function! s:ManPager()
if n > 1
exe "1," . n-1 . "d"
endif
- setlocal nomodified readonly
+ setlocal nomodifiable nomodified readonly nowrite
syntax on
endfunction