runtime(vimgoto): make gf extract packadd/colo name more flexible Commit: https://github.com/vim/vim/commit/dd9ed09d8eb54fe3328bfdf385a0c978f308eccd Author: Shane-XB-Qian <shane.q...@foxmail.com> Date: Wed Aug 13 22:31:09 2025 +0200
runtime(vimgoto): make gf extract packadd/colo name more flexible closes: https://github.com/vim/vim/issues/17983 Signed-off-by: Shane-XB-Qian <shane.q...@foxmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/autoload/vimgoto.vim b/runtime/autoload/vimgoto.vim index b34dcc1a1..ffeab0af4 100644 --- a/runtime/autoload/vimgoto.vim +++ b/runtime/autoload/vimgoto.vim @@ -3,7 +3,7 @@ vim9script # Language: Vim9 script # Contributers: @lacygoill # Shane-XB-Qian -# Last Change: 2025 Aug 12 +# Last Change: 2025 Aug 13 # # Vim Script to handle # :import, :packadd and :colorscheme @@ -39,7 +39,7 @@ enddef #}}}1 # Core {{{1 def HandlePackaddLine(editcmd: string, curline: string) #{{{2 - var pat: string = '^\s*\%(:\s*\)\=packadd!\=\s\+\zs\S\+$' + var pat: string = '\s*\%(:\s*\)\=packadd!\=\s\+\zs\S\+\>\ze' var plugin: string = curline ->matchstr(pat) ->substitute('^vim-\|\.vim$', '', 'g') @@ -65,7 +65,7 @@ def HandlePackaddLine(editcmd: string, curline: string) #{{{2 enddef def HandleColoLine(editcmd: string, curline: string) #{{{2 - var pat: string = '^\s*\%(:\s*\)\=colo\%[rscheme]\s\+\zs\S\+$' + var pat: string = '\s*\%(:\s*\)\=colo\%[rscheme]\s\+\zs\S\+\>\ze' var colo: string = curline->matchstr(pat) if colo == '' -- -- 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 vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1umILH-00D7f7-T6%40256bit.org.