fix cursor placing for haml & slim. close #92

This commit is contained in:
mattn
2012-08-23 11:39:28 +09:00
parent b45b08f5e8
commit 72e10f85fe
2 changed files with 4 additions and 0 deletions

View File

@@ -68,6 +68,8 @@ function! zencoding#lang#haml#toString(settings, current, type, inline, filters,
let str .= "\n" . indent . line . " |" let str .= "\n" . indent . line . " |"
endfor endfor
endif endif
elseif len(current.child) == 0
let str .= '${cursor}'
endif endif
if len(current.child) == 1 && len(current.child[0].name) == 0 if len(current.child) == 1 && len(current.child[0].name) == 0
let text = current.child[0].value[1:-2] let text = current.child[0].value[1:-2]

View File

@@ -48,6 +48,8 @@ function! zencoding#lang#slim#toString(settings, current, type, inline, filters,
for line in split(text, "\n") for line in split(text, "\n")
let str .= indent . "| " . line . "\n" let str .= indent . "| " . line . "\n"
endfor endfor
elseif len(current.child) == 0
let str .= '${cursor}'
endif endif
if len(current.child) == 1 && len(current.child[0].name) == 0 if len(current.child) == 1 && len(current.child[0].name) == 0
let str .= "\n" let str .= "\n"