mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-01-09 04:52:33 +08:00
Fix duplicate closing delimiter after <CR>
This commit is contained in:
@@ -494,8 +494,12 @@ function! delimitMate#Finish() " {{{
|
||||
let b:delimitMate_buffer = []
|
||||
let line = getline('.')
|
||||
let col = col('.') -2
|
||||
"echom 'col: ' . col . '-' . line[:col] . "|" . line[col+len+1:] . '%' . buffer
|
||||
call setline('.', line[:col] . line[col+len+1:])
|
||||
echom 'col: ' . col . '-' . line[:col] . "|" . line[col+len+1:] . '%' . buffer
|
||||
if col < 0
|
||||
call setline('.', line[col+len+1:])
|
||||
else
|
||||
call setline('.', line[:col] . line[col+len+1:])
|
||||
endif
|
||||
let i = 1
|
||||
let lefts = "\<Left>"
|
||||
while i < len
|
||||
|
||||
@@ -203,6 +203,9 @@ function! delimitMateTests#Main() " {{{
|
||||
unlet g:delimitMate_excluded_ft
|
||||
set ft=
|
||||
|
||||
" Duplicated delimiter after CR
|
||||
call Type("Duplicated delimiter after CR", "(\<CR>", ['(', '|)'], [])
|
||||
|
||||
"}}}
|
||||
|
||||
" Show results: {{{
|
||||
|
||||
Reference in New Issue
Block a user