mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-01-21 02:22:17 +08:00
Fix #16 Finish() didn't reset the char buffer.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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", ['(|)(|)'])
|
||||
|
||||
Reference in New Issue
Block a user