- Fixed #180 select default.

This commit is contained in:
Shougo Matsushita 2013-09-23 13:26:44 +09:00
parent b7ec09cf4d
commit e1d053c3b7

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: neosnippet.vim " FILE: neosnippet.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 08 Sep 2013. " Last Modified: 23 Sep 2013.
" 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
@ -821,7 +821,8 @@ function! s:expand_placeholder(start, end, holder_cnt, line, ...) "{{{
\ s:get_mirror_placeholder_marker_substitute_pattern(), \ s:get_mirror_placeholder_marker_substitute_pattern(),
\ '<|\1|>', 'g') \ '<|\1|>', 'g')
let default_len = len(default) " len() cannot use for multibyte.
let default_len = len(substitute(default, '.', 'x', 'g'))
let pos = getpos('.') let pos = getpos('.')
let pos[1] = a:line let pos[1] = a:line