- Fixed nested placeholder problem.

This commit is contained in:
Shougo Matsushita 2012-04-05 09:53:52 +09:00
parent 35a112de90
commit c85e8c2303
2 changed files with 12 additions and 1 deletions

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: snippets_complete.vim " FILE: snippets_complete.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 23 Mar 2012. " Last Modified: 05 Apr 2012.
" License: MIT license {{{ " License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining " Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the " a copy of this software and associated documentation files (the
@ -744,6 +744,14 @@ function! s:expand_placeholder(start, end, holder_cnt, line)"{{{
\ '\\d\\+', a:holder_cnt, '') \ '\\d\\+', a:holder_cnt, '')
let default = substitute( let default = substitute(
\ matchstr(current_line, default_pattern), '\\\ze.', '', 'g') \ matchstr(current_line, default_pattern), '\\\ze.', '', 'g')
" Substitute marker.
let default = substitute(default,
\ s:get_placeholder_marker_substitute_pattern(),
\ '<`\1`>', 'g')
let default = substitute(default,
\ s:get_mirror_placeholder_marker_substitute_pattern(),
\ '<|\1|>', 'g')
let default_len = len(default) let default_len = len(default)
let pos = getpos('.') let pos = getpos('.')

View File

@ -295,6 +295,9 @@ snippet *neocomplcache-snippets-complete-unite-action-snippet*
============================================================================== ==============================================================================
CHANGELOG *neocomplcache-snippets-complete-changelog* CHANGELOG *neocomplcache-snippets-complete-changelog*
2012-04-05
- Fixed nested placeholder problem.
2012-03-23 2012-03-23
- Fixed substitute pattern bug. - Fixed substitute pattern bug.