Skip to content

Commit

Permalink
runtime(man): Man plugin does not respect 'gdefault'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ychin authored and chrisbra committed Sep 16, 2023
1 parent e2deb7e commit 249a208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/autoload/dist/man.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down

0 comments on commit 249a208

Please sign in to comment.