Fix #16 Finish() didn't reset the char buffer.

This commit is contained in:
Israel Chauca Fuentes
2010-05-11 09:58:17 -05:00
parent 6d4113e3c3
commit 95c899f3e2
2 changed files with 6 additions and 0 deletions

View File

@@ -490,6 +490,8 @@ function! delimitMate#Finish() " {{{
let len = len(b:delimitMate_buffer)
if len > 0
let buffer = join(b:delimitMate_buffer, '')
" Reset buffer:
let b:delimitMate_buffer = []
let line = getline('.')
let col = col('.') -2
"echom 'col: ' . col . '-' . line[:col] . "|" . line[col+len+1:] . '%' . buffer

View File

@@ -188,6 +188,10 @@ function! delimitMateTests#Main() " {{{
call Type("Backspace inside space expansion", "(\<Space>\<BS>", ['(|)'], ['expand_space:1'])
call RepeatLast("Backspace inside space expansion", ['(|)(|)'])
" <Right-arrow> shouldn't insert any text
call Type("<Right-arrow> shouldn't insert any text", "(hello\<Right>\<Space>there\<Right>\<Right>", ['(hello) there|'], [])
call RepeatLast("Backspace inside space expansion", ['(|)(|)'])
" Backspace inside CR expansion
call Type("Backspace inside CR expansion", "(\<CR>\<BS>", ['(|)'], ['expand_cr:1'])
call RepeatLast("Backspace inside CR expansion", ['(|)(|)'])