fixed wrap included "{}". closes #5.

This commit is contained in:
mattn
2010-07-06 23:45:51 +09:00
parent 4ff2179ee3
commit be54da653a

View File

@@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" File: zencoding.vim " File: zencoding.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> " Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" Last Change: 03-Jul-2010. " Last Change: 06-Jul-2010.
" Version: 0.43 " Version: 0.43
" WebPage: http://github.com/mattn/zencoding-vim " WebPage: http://github.com/mattn/zencoding-vim
" Description: vim plugins for HTML and CSS hi-speed coding. " Description: vim plugins for HTML and CSS hi-speed coding.
@@ -1433,13 +1433,16 @@ function! s:zen_expandAbbr(mode) range
endif endif
endfor endfor
if len(leader) if len(leader)
let items = s:zen_parseIntoTree(leader . "{\n" . str . "}", type).child let items = s:zen_parseIntoTree(leader, type).child
let items[0].value = "{\n".str."}"
else else
let items = s:zen_parseIntoTree(leader . "{" . str . "}", type).child let items = s:zen_parseIntoTree(leader, type).child
let items[0].value = "{".str."}"
endif endif
else else
let str .= getline(a:firstline) let str .= getline(a:firstline)
let items = s:zen_parseIntoTree(leader . "{" . str . "}", type).child let items = s:zen_parseIntoTree(leader, type).child
let items[0].value = "{".str."}"
endif endif
for item in items for item in items
let expand .= s:zen_toString(item, type, 0, filters) let expand .= s:zen_toString(item, type, 0, filters)