runtime(manpager): use instead of for BEL in OSC 8 regex
Commit:
https://github.com/vim/vim/commit/a603175c6cbe1f8aa37493c421f91a0dc49dff3d
Author: Yasuhiro Matsumoto <[email protected]>
Date: Tue Mar 24 19:45:04 2026 +0000
runtime(manpager): use \x07 instead of for BEL in OSC 8 regex
in Vim's regex matches [A-Za-z], not the BEL character (0x07).
This caused the OSC 8 hyperlink stripping pattern to incorrectly
match alphabetic characters, breaking man page display.
Use \x07 (inside []) and %x07 (outside []) to correctly match BEL.
closes: #19806
Signed-off-by: Yasuhiro Matsumoto <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/plugin/manpager.vim b/runtime/plugin/manpager.vim
index e0d269743..e3a8ea55a 100644
--- a/runtime/plugin/manpager.vim
+++ b/runtime/plugin/manpager.vim
@@ -2,6 +2,7 @@
" Maintainer: Enno Nagel <[email protected]>
" Last Change: 2024 Jul 03
" 2026 Mar 22 by Vim Project: strip OSC 9 sequences (#19787)
+" 2026 Mar 24 by Vim Project: strip Bell char: Ctrl-G (#19807)
if exists('g:loaded_manpager_plugin')
finish
@@ -33,8 +34,8 @@ function s:ManPager()
" Remove ansi sequences
exe 'silent! keepj keepp %s/ \[%(%(\d;)?\d{1,2})?[mK]//e' .. (&gdefault ?
'' : 'g')
- " Remove OSC 8 hyperlink sequences: ]8;;... \ or ]8;;...
- exe 'silent! keepj keepp %s/ \]8;[^ ]*%( | \)//e' .. (&gdefault ? '' : 'g')
+ " Remove OSC 8 hyperlink sequences: ]8;;... \ or ]8;;...<BEL>
+ exe 'silent! keepj keepp %s/ \]8;[^\x07 ]*%(%x07| \)//e' .. (&gdefault ? ''
: 'g')
" Remove empty lines above the header
call cursor(1, 1)
--
--
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 visit
https://groups.google.com/d/msgid/vim_dev/E1w57v1-0049QU-Mt%40256bit.org.