Re: [vim/vim] manpager: OSC8 pattern uses \a [A-Za-z] instead of BEL (Issue #19794)

6 views
Skip to first unread message

mattn

unread,
Mar 23, 2026, 9:00:35 PM (yesterday) Mar 23
to vim/vim, Subscribed
mattn left a comment (vim/vim#19794)

Thank you for the report. Could you try this fix and see if it resolves the issue?

9774651 used \a which indeed matches [A-Za-z] in Vim's regex, not BEL. The fix changes it to \x07 (inside []) and %x07 (outside []).

-  exe 'silent! keepj keepp %s/\v\e\]8;[^\a\e]*%(\a|\e\\)//e' .. (&gdefault ? '' : 'g')
+  exe 'silent! keepj keepp %s/\v\e\]8;[^\x07\e]*%(%x07|\e\\)//e' .. (&gdefault ? '' : 'g')


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19794/4114690014@github.com>

bnnkw

unread,
2:18 AM (21 hours ago) 2:18 AM
to vim/vim, Subscribed
bnnkw left a comment (vim/vim#19794)

I confirmed the fix resolves this issue and tested the pattern with the shell script below.

#!/bin/bash                                                                                                                                                                                                      
                                                                                                                                                                                                                 
# test_osc.sh [vimpattern]                                                                                                                                                                                       
                                                                                                                                                                                                                 
# Use 'vim -e -s  < thefilter  thefile' form from :help -s-ex                                                                                                                                                    
#   stdin: Ex commands                                                                                                                                                                                           
#   file:  OSC8 data                                                                                                                                                                                             
vim --clean -es < <(cat <<EOF                                                                                                                                                                                    
%print                                                                                                                                                                                                           
%s/$1//ge                                                                                                                                                                                                        
%print                                                                                                                                                                                                           
q!                                                                                                                                                                                                               
EOF                                                                                                                                                                                                              
) \                                                                                                                                                                                                              
  <(builtin echo -e "                                                                                                                                                                                            
\e]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#ls-a\e\\-a, --all\e]8;;\e\\                                                                                                                   
\e]8;;http://example.com/BEL\aBEL instead of ST\e]8;;\a                                                                                                                                                          
\e]8;;http://example.com/\e\\link1\e]8;;\e\\, \e]8;;http://example.com/\e\\link2\e]8;;\e\\                                                                                                                       
")                                                                                                                                                                                                               
(vt) [vim]$ ./test_osc8.sh '\v\e\]8;[^\x07\e]*%(%x07|\e\\)'                                                                                                                                                      
                                                                                                                                                                                                                 
^[]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#ls-a^[\-a, --all^[]8;;^[\                                                                                                                     
^[]8;;http://example.com/BEL^GBEL instead of ST^[]8;;^G                                                                                                                                                          
^[]8;;http://example.com/^[\link1^[]8;;^[\, ^[]8;;http://example.com/^[\link2^[]8;;^[\                                                                                                                           
                                                                                                                                                                                                                 
                                                                                                                                                                                                                 
-a, --all                                                                                                                                                                                                        
BEL instead of ST                                                                                                                                                                                                
link1, link2                                                                                                                                                                                                     
                                                                                                                                                                                                                 


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19794/4115701569@github.com>

Christian Brabandt

unread,
4:53 PM (6 hours ago) 4:53 PM
to vim/vim, Subscribed

Closed #19794 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/19794/issue_event/23867003852@github.com>

Christian Brabandt

unread,
4:53 PM (6 hours ago) 4:53 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19794)

fixed by #19806


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19794/4121286498@github.com>

Reply all
Reply to author
Forward
0 new messages