From c678061b793e3fa58095cfb2279470bcab58f7d3 Mon Sep 17 00:00:00 2001 From: Israel Chauca Fuentes Date: Thu, 27 Nov 2014 01:48:34 -0500 Subject: [PATCH] Fix `'`. Closes #178. --- autoload/delimitMate.vim | 4 ++++ test/autoclose_quotes.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index b92617a..c0a5afd 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -186,6 +186,10 @@ function! delimitMate#IsSpaceExpansion() " {{{ endfunction " }}} IsSpaceExpansion() function! delimitMate#WithinEmptyPair() "{{{ + " if cursor is at column 1 return 0 + if col('.') == 1 + return 0 + endif " get char before the cursor. let char1 = delimitMate#GetCharFromCursor(-1) " get char under the cursor. diff --git a/test/autoclose_quotes.txt b/test/autoclose_quotes.txt index 4135c6c..02c002b 100644 --- a/test/autoclose_quotes.txt +++ b/test/autoclose_quotes.txt @@ -70,3 +70,4 @@ let g:delimitMate_smart_quotes = '!\s\%#\_.' "zyx'x" "zyx'x" "zyx 'x" "zyx 'x'" unlet g:delimitMate_smart_quotes +"'\\" "''"