aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-04-25 10:57:14 +0200
committerGitHub <noreply@github.com>2022-04-25 01:57:14 -0700
commit440b65c338a7ab18e4ed2256d411cf0d3ce698c4 (patch)
tree6af37c6e1b655792a040e80b6843f5765514de35
parent89df042a89c8c94cef37a1b1b26ada673bab78d0 (diff)
downloadrneovim-440b65c338a7ab18e4ed2256d411cf0d3ce698c4.tar.gz
rneovim-440b65c338a7ab18e4ed2256d411cf0d3ce698c4.tar.bz2
rneovim-440b65c338a7ab18e4ed2256d411cf0d3ce698c4.zip
revert: "man.vim: Ensure 'modifiable' in man#init_pager" #17791
This reverts commit 526798a941b4cf80fd1f128b40e51fb47c77b654. This will make man filetype not modifiable by default, as it is the superior behavior in my opinion. More importantly, also make it possible for a user to modify man filetypes by adding `set modifiable` in `~/.config/nvim/ftplugin/man.vim` or its equivalent. ref #11450 closes #17595 Co-authored-by: Javier López <graulopezjavier@gmail.com>
-rw-r--r--runtime/autoload/man.vim7
1 files changed, 1 insertions, 6 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index b28170b7a1..4d6a1f78dc 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -123,12 +123,12 @@ function! s:system(cmd, ...) abort
endfunction
function! s:set_options(pager) abort
- setlocal filetype=man
setlocal noswapfile buftype=nofile bufhidden=hide
setlocal nomodified readonly nomodifiable
if a:pager
nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR>
endif
+ setlocal filetype=man
endfunction
function! s:get_page(path) abort
@@ -473,10 +473,6 @@ endfunction
" Called when Nvim is invoked as $MANPAGER.
function! man#init_pager() abort
- " https://github.com/neovim/neovim/issues/6828
- let og_modifiable = &modifiable
- setlocal modifiable
-
if getline(1) =~# '^\s*$'
silent keepjumps 1delete _
else
@@ -496,7 +492,6 @@ function! man#init_pager() abort
endif
call s:set_options(v:true)
- let &l:modifiable = og_modifiable
endfunction
function! man#goto_tag(pattern, flags, info) abort