summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorYee Cheng Chin <ychin.git@gmail.com>2023-09-16 18:09:47 +0200
committerChristian Brabandt <cb@256bit.org>2023-09-16 18:12:14 +0200
commit249a2088036fb77948f208050b9f7790bf3c11a8 (patch)
tree12f99fa50a720f82b6db2e381045798b6632ba20 /runtime
parente2deb7e598687e6359009c509d14f8b85be5a13b (diff)
runtime(man): Man plugin does not respect 'gdefault'
Fix the issue introduced by #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 <cb@256bit.org>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/dist/man.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/autoload/dist/man.vim b/runtime/autoload/dist/man.vim
index 315636a2ef..7f7d137113 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/\v(.)\b\ze\1?//ge
+ exe 'silent! keepjumps keeppatterns %s/\v(.)\b\ze\1?//e' .. (&gdefault ? '' : 'g')
if unsetwidth
let $MANWIDTH = ''