Commit: runtime(man): Man plugin does not respect 'gdefault'

5 views
Skip to first unread message

Christian Brabandt

unread,
Sep 16, 2023, 12:15:14 PM9/16/23
to vim...@googlegroups.com
runtime(man): Man plugin does not respect 'gdefault'

Commit: https://github.com/vim/vim/commit/249a2088036fb77948f208050b9f7790bf3c11a8
Author: Yee Cheng Chin <ychi...@gmail.com>
Date: Sat Sep 16 18:09:47 2023 +0200

runtime(man): Man plugin does not respect 'gdefault'

Fix the issue introduced by https://github.com/vim/vim/issues/12557. `:substitute` commands in plugins
need to take into account whether `gdefault` is set or not because
that depends on the user.

closes: #13097

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/autoload/dist/man.vim b/runtime/autoload/dist/man.vim
index 315636a2e..7f7d13711 100644
--- a/runtime/autoload/dist/man.vim
+++ b/runtime/autoload/dist/man.vim
@@ -196,7 +196,7 @@ func dist#man#GetPage(cmdmods, ...)

" Emulate piping the buffer through the "col -b" command.
" Ref: https://github.com/vim/vim/issues/12301
- silent! keepjumps keeppatterns %s/ (.) \ze ?//ge
+ exe 'silent! keepjumps keeppatterns %s/ (.) \ze ?//e' .. (&gdefault ? '' : 'g')

if unsetwidth
let $MANWIDTH = ''
Reply all
Reply to author
Forward
0 new messages