From 96cf9fd8add2363e30e437d42a8d3e2e6666785a Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Thu, 1 Nov 2012 11:26:40 +0900 Subject: [PATCH] - Fixed substitute of target. --- autoload/neosnippet.vim | 6 +++--- doc/neosnippet.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index 520cf79..27ce49e 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -808,7 +808,7 @@ function! s:expand_placeholder(start, end, holder_cnt, line)"{{{ let is_target = 0 endif - let default = substitute(default, '^TARGET:\?\>', '', '') + let default = substitute(default, '^TARGET:\?', '', '') let neosnippet.selected_text = default @@ -914,7 +914,7 @@ function! s:search_sync_placeholder(start, end, number)"{{{ \ '\\d\\+', '\\zs\\d\\+\\ze', '')) return search(substitute( \ s:get_mirror_placeholder_marker_pattern(), - \ '\\d\\+', cnt, ''), 'nw') > 0 ? cnt : 0 + \ '\\d\\+', cnt, ''), 'nw') > 0 ? cnt : -1 endif let pattern = substitute( @@ -925,7 +925,7 @@ function! s:search_sync_placeholder(start, end, number)"{{{ return a:number endfor - return 0 + return -1 endfunction"}}} function! s:substitute_placeholder_marker(start, end, snippet_holder_cnt)"{{{ if a:snippet_holder_cnt > 0 diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index d68fcad..5035187 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -639,6 +639,7 @@ CHANGELOG *neosnippet-changelog* 2012-11-01 - Fixed snippet mirror behavior. +- Fixed substitute of target. 2012-10-31 - Improved indent_snippet().