From: Hiroshi Shirosaki Date: Thu, 28 Feb 2019 00:00:04 +0000 (+0900) Subject: Fix test errors with latest vim X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/691d961a643064ee1feddba8371ff12e44678f5a?hp=--cc Fix test errors with latest vim Do not use a: for non function arguments. --- 691d961a643064ee1feddba8371ff12e44678f5a diff --git a/test/vimrc b/test/vimrc index 463cbd8..fe53a75 100644 --- a/test/vimrc +++ b/test/vimrc @@ -11,14 +11,14 @@ filetype indent on syntax on function! Markdown_GetScriptID(fname) abort - let a:snlist = '' - redir => a:snlist + let l:snlist = '' + redir => l:snlist silent! scriptnames redir END - let a:mx = '^\s*\(\d\+\):\s*\(.*\)$' - for a:line in split(a:snlist, "\n") - if stridx(substitute(a:line, '\\', '/', 'g'), a:fname) >= 0 - return substitute(a:line, a:mx, '\1', '') + let l:mx = '^\s*\(\d\+\):\s*\(.*\)$' + for l:line in split(l:snlist, "\n") + if stridx(substitute(l:line, '\\', '/', 'g'), a:fname) >= 0 + return substitute(l:line, l:mx, '\1', '') endif endfor endfunction