Fix incorrect script id (part 2)

This is a follow-up to 28abadc.

Without the \zs, everything up to the regexp for the script ID would be
used.

Now, s:function() is the same as the one used in scriptease.
This commit is contained in:
Marco Hinz
2019-10-07 18:52:16 +02:00
committed by Tim Pope
parent 28abadcb84
commit 698065596c

View File

@@ -15,7 +15,7 @@ endif
" Section: Utility " Section: Utility
function! s:function(name) abort function! s:function(name) abort
return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '.*<SNR>\d\+_'),'')) return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '.*\zs<SNR>\d\+_'),''))
endfunction endfunction
function! s:sub(str,pat,rep) abort function! s:sub(str,pat,rep) abort