runtime(man): remove backslashes in man pages using Vim script (#12557)

Commit: 
https://github.com/vim/vim/commit/17befac581ea67f56039db832d68963cd401fb8a
Author: lifecrisis <[email protected]>
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 <[email protected]>

diff --git a/runtime/autoload/dist/man.vim b/runtime/autoload/dist/man.vim
index 5b8b4456d..315636a2e 100644
--- 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 <[email protected]>
+" Maintainer:  Jason Franklin <[email protected]>
 " Maintainer:  SungHyun Nam <[email protected]>
 " 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

-- 
-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qXnQA-00AsLY-71%40256bit.org.

Raspunde prin e-mail lui