diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index 081181cfe9..0416e41368 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -6,7 +6,7 @@ if exists('b:did_ftplugin') || &filetype !=# 'man' endif let b:did_ftplugin = 1 -let s:pager = get(s:, 'pager', 0) || !exists('b:man_sect') +let s:pager = !exists('b:man_sect') if s:pager call man#init_pager() @@ -26,7 +26,7 @@ if !exists('g:no_plugin_maps') && !exists('g:no_man_maps') nnoremap j gj nnoremap k gk nnoremap gO :call man#show_toc() - if 1 == bufnr('%') || s:pager + if s:pager nnoremap q :lclose:q else nnoremap q :lclosec