bugfix: variable mirror_marker is undefined at that time
This commit is contained in:
parent
9cd3fcb048
commit
3ca2e1d846
@ -963,13 +963,13 @@ function! s:substitute_placeholder_marker(start, end, snippet_holder_cnt) "{{{
|
|||||||
let cnt = matchstr(getline('.'),
|
let cnt = matchstr(getline('.'),
|
||||||
\ substitute(s:get_sync_placeholder_marker_pattern(),
|
\ substitute(s:get_sync_placeholder_marker_pattern(),
|
||||||
\ '\\d\\+', '\\zs\\d\\+\\ze', ''))
|
\ '\\d\\+', '\\zs\\d\\+\\ze', ''))
|
||||||
|
let mirror_marker = substitute(
|
||||||
|
\ s:get_mirror_placeholder_marker_pattern(),
|
||||||
|
\ '\\d\\+', cnt, '')
|
||||||
silent execute printf('%%s/' . mirror_marker . '/%s/'
|
silent execute printf('%%s/' . mirror_marker . '/%s/'
|
||||||
\ . (&gdefault ? 'g' : ''), sub)
|
\ . (&gdefault ? 'g' : ''), sub)
|
||||||
let sync_marker = substitute(s:get_sync_placeholder_marker_pattern(),
|
let sync_marker = substitute(s:get_sync_placeholder_marker_pattern(),
|
||||||
\ '\\d\\+', cnt, '')
|
\ '\\d\\+', cnt, '')
|
||||||
let mirror_marker = substitute(
|
|
||||||
\ s:get_mirror_placeholder_marker_pattern(),
|
|
||||||
\ '\\d\\+', cnt, '')
|
|
||||||
call setline('.', substitute(getline('.'), sync_marker, sub, ''))
|
call setline('.', substitute(getline('.'), sync_marker, sub, ''))
|
||||||
endif
|
endif
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
Loading…
Reference in New Issue
Block a user