From 821e0019fb9d3defecf37b814ca298ffd4a1d91f Mon Sep 17 00:00:00 2001 From: Israel Chauca Fuentes Date: Tue, 24 Dec 2013 13:20:39 -0500 Subject: [PATCH] Consider popup menu when expanding. Close #154. --- autoload/delimitMate.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index c7c490d..87bce8d 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -471,12 +471,13 @@ function! delimitMate#ExpandReturn() "{{{ endif let escaped = delimitMate#CursorIdx() >= 2 \ && delimitMate#GetCharFromCursor(-2) == '\' - if delimitMate#WithinEmptyMatchpair() + if !pumvisible() && ( + \ delimitMate#WithinEmptyMatchpair() \ || (s:g('expand_cr') == 2 \ && index(s:g('right_delims'), delimitMate#GetCharFromCursor(0)) > -1) \ || (s:g('expand_inside_quotes') \ && delimitMate#WithinEmptyQuotes() - \ && !escaped) + \ && !escaped)) " Expand: " XXX zv prevents breaking expansion with syntax folding enabled by " InsertLeave.