runtime(manpager): avoid readonly prompt

Commit: 
https://github.com/vim/vim/commit/9d85d4dcf9c738ab27f5591c62d5e54c421967a1
Author: Enno <konf...@users.noreply.github.com>
Date:   Thu Jul 4 13:37:10 2024 +0200

    runtime(manpager): avoid readonly prompt
    
    fixes: https://github.com/vim/vim/issues/15103
    closes: https://github.com/vim/vim/issues/15106
    
    Signed-off-by: Enno <konf...@users.noreply.github.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/plugin/manpager.vim b/runtime/plugin/manpager.vim
index 076aca5f8..6ed603025 100644
--- a/runtime/plugin/manpager.vim
+++ b/runtime/plugin/manpager.vim
@@ -1,6 +1,6 @@
 " Vim plugin for using Vim as manpager.
 " Maintainer: Enno Nagel <ennonagel+...@gmail.com>
-" Last Change: 2022 Oct 17
+" Last Change: 2024 Jul 03
 
 if exists('g:loaded_manpager_plugin')
   finish
@@ -20,9 +20,6 @@ function s:ManPager()
   endif
   syntax on
 
-  " Make this an unlisted, readonly scratch buffer
-  setlocal buftype=nofile noswapfile bufhidden=hide nobuflisted readonly
-
   " Ensure text width matches window width
   setlocal foldcolumn& nofoldenable nonumber norelativenumber
 
@@ -45,6 +42,9 @@ function s:ManPager()
   " Finished preprocessing the buffer, prevent any further modifications
   setlocal nomodified nomodifiable
 
+  " Make this an unlisted, readonly scratch buffer
+  setlocal buftype=nofile noswapfile bufhidden=hide nobuflisted readonly
+
   " Set filetype to man even if ftplugin is disabled
   setlocal filetype=man
   runtime ftplugin/man.vim

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1sPKtc-0029Ds-5u%40256bit.org.

Raspunde prin e-mail lui