diff options
author | Arsham Shirvani <arshamshirvani@gmail.com> | 2022-05-13 15:49:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 07:49:08 -0700 |
commit | f6ba7d69be2c57f80c9ee95276733e949aceb009 (patch) | |
tree | e01e8ad790bb33b42e31064d5aa660b5a311380c /runtime/autoload/man.vim | |
parent | eb4b337d9eb8bf15cf0b832f46ea9cff14d6adce (diff) | |
download | rneovim-f6ba7d69be2c57f80c9ee95276733e949aceb009.tar.gz rneovim-f6ba7d69be2c57f80c9ee95276733e949aceb009.tar.bz2 rneovim-f6ba7d69be2c57f80c9ee95276733e949aceb009.zip |
fix(man.vim): q in "$MANPAGER mode" does not quit #18443
Problem:
q in "$MANPAGER mode" does not quit Nvim. This is because
ftplugin/man.vim creates its own mapping:
nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c
which overrides the one set by the autoload file when using :Man!
("$MANPAGER mode")
Solution:
Set b:pager during "$MANPAGER mode" so that ftplugin/man.vim can set the
mapping correctly.
Fixes #18281
Ref #17791
Helped-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Diffstat (limited to 'runtime/autoload/man.vim')
-rw-r--r-- | runtime/autoload/man.vim | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index 4d6a1f78dc..065ca8432e 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -125,9 +125,7 @@ endfunction function! s:set_options(pager) abort setlocal noswapfile buftype=nofile bufhidden=hide setlocal nomodified readonly nomodifiable - if a:pager - nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR> - endif + let b:pager = a:pager setlocal filetype=man endfunction |