runtime(man): Fix <Plug>ManBS Commit: https://github.com/vim/vim/commit/1c4f40213bbb848091dcacd7c5b34f6a45e341a7 Author: Luca Saccarola <github.e4...@aleeas.com> Date: Thu Aug 22 21:16:25 2024 +0200
runtime(man): Fix <Plug>ManBS This change does 2 things: - make sure the mapping <Plug>ManBS sets the buffer to modified to avoid a potential error message - remove commented q mapping fixes #15538 closes: #15547 Signed-off-by: Luca Saccarola <github.e4...@aleeas.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index f0723ef7b..f1142ee0f 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -5,6 +5,7 @@ " Autoload Split: Bram Moolenaar " Last Change: 2024 Jun 06 (disabled the q mapping, #8210) " 2024 Jul 06 (use nnoremap, #15130) +" 2024 Aug 22 (fix the <Plug>ManBS mapping, #15547) " To make the ":Man" command available before editing a manual page, source " this script from your startup vimrc file. @@ -36,20 +37,16 @@ if &filetype == "man" let b:undo_ftplugin = b:undo_ftplugin \ . '|silent! nunmap <buffer> <LocalLeader>h' endif - nnoremap <buffer> <Plug>ManBS :%s/. //g<CR>:setl nomod<CR>'' + nnoremap <buffer> <Plug>ManBS :setl ma<bar>%s/. //ge<bar>setl noma<CR> nnoremap <buffer> <silent> <c-]> :call dist#man#PreGetPage(v:count)<CR> nnoremap <buffer> <silent> <c-t> :call dist#man#PopPage()<CR> - " Disabled, since this hides the ability to record a macro or use the - " command line window - " nnoremap <buffer> <silent> q :q<CR> " Add undo commands for the maps let b:undo_ftplugin = b:undo_ftplugin \ . '|silent! nunmap <buffer> <Plug>ManBS' \ . '|silent! nunmap <buffer> <c-]>' \ . '|silent! nunmap <buffer> <c-t>' - "\ . '|silent! nunmap <buffer> q' endif if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1) -- -- 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/E1shDVT-001Lh7-FM%40256bit.org.