Mercurial > vim
changeset 32929:4ae88f9389b4
runtime(man): remove backslashes in man pages using Vim script (#12557)
Commit: https://github.com/vim/vim/commit/17befac581ea67f56039db832d68963cd401fb8a
Author: lifecrisis <jrf@elitemail.org>
Date: Sun Aug 20 18:41:25 2023 +0000
runtime(man): remove backslashes in man pages using Vim script (https://github.com/vim/vim/issues/12557)
Closes: vim/vimhttps://github.com/vim/vim/issues/12301
Co-authored-by: Jason Franklin <jason@oneway.dev>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 20 Aug 2023 20:45:06 +0200 |
parents | 35df5aacd019 |
children | 2ff007677dba |
files | runtime/autoload/dist/man.vim |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/autoload/dist/man.vim +++ b/runtime/autoload/dist/man.vim @@ -1,6 +1,6 @@ " Vim filetype plugin autoload file " Language: man -" Maintainer: Jason Franklin <vim@justemail.net> +" Maintainer: Jason Franklin <jason@oneway.dev> " Maintainer: SungHyun Nam <goweol@gmail.com> " Autoload Split: Bram Moolenaar " Last Change: 2023 Jun 28 @@ -190,9 +190,14 @@ func dist#man#GetPage(cmdmods, ...) endif let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat' let env_cmd .= ' GROFF_NO_SGR=1' - let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b' + let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) + silent exec "r !" . man_cmd + " Emulate piping the buffer through the "col -b" command. + " Ref: https://github.com/vim/vim/issues/12301 + silent! keepjumps keeppatterns %s/(.)\ze?//ge + if unsetwidth let $MANWIDTH = '' endif