- Fixed substitute of target.
This commit is contained in:
parent
01a4e239f8
commit
96cf9fd8ad
@ -808,7 +808,7 @@ function! s:expand_placeholder(start, end, holder_cnt, line)"{{{
|
|||||||
let is_target = 0
|
let is_target = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let default = substitute(default, '^TARGET:\?\>', '', '')
|
let default = substitute(default, '^TARGET:\?', '', '')
|
||||||
|
|
||||||
let neosnippet.selected_text = default
|
let neosnippet.selected_text = default
|
||||||
|
|
||||||
@ -914,7 +914,7 @@ function! s:search_sync_placeholder(start, end, number)"{{{
|
|||||||
\ '\\d\\+', '\\zs\\d\\+\\ze', ''))
|
\ '\\d\\+', '\\zs\\d\\+\\ze', ''))
|
||||||
return search(substitute(
|
return search(substitute(
|
||||||
\ s:get_mirror_placeholder_marker_pattern(),
|
\ s:get_mirror_placeholder_marker_pattern(),
|
||||||
\ '\\d\\+', cnt, ''), 'nw') > 0 ? cnt : 0
|
\ '\\d\\+', cnt, ''), 'nw') > 0 ? cnt : -1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let pattern = substitute(
|
let pattern = substitute(
|
||||||
@ -925,7 +925,7 @@ function! s:search_sync_placeholder(start, end, number)"{{{
|
|||||||
return a:number
|
return a:number
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
return 0
|
return -1
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
function! s:substitute_placeholder_marker(start, end, snippet_holder_cnt)"{{{
|
function! s:substitute_placeholder_marker(start, end, snippet_holder_cnt)"{{{
|
||||||
if a:snippet_holder_cnt > 0
|
if a:snippet_holder_cnt > 0
|
||||||
|
@ -639,6 +639,7 @@ CHANGELOG *neosnippet-changelog*
|
|||||||
|
|
||||||
2012-11-01
|
2012-11-01
|
||||||
- Fixed snippet mirror behavior.
|
- Fixed snippet mirror behavior.
|
||||||
|
- Fixed substitute of target.
|
||||||
|
|
||||||
2012-10-31
|
2012-10-31
|
||||||
- Improved indent_snippet().
|
- Improved indent_snippet().
|
||||||
|
Loading…
Reference in New Issue
Block a user