mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-08 05:34:45 +08:00
Consider popup menu when expanding. Close #154.
This commit is contained in:
@@ -471,12 +471,13 @@ function! delimitMate#ExpandReturn() "{{{
|
|||||||
endif
|
endif
|
||||||
let escaped = delimitMate#CursorIdx() >= 2
|
let escaped = delimitMate#CursorIdx() >= 2
|
||||||
\ && delimitMate#GetCharFromCursor(-2) == '\'
|
\ && delimitMate#GetCharFromCursor(-2) == '\'
|
||||||
if delimitMate#WithinEmptyMatchpair()
|
if !pumvisible() && (
|
||||||
|
\ delimitMate#WithinEmptyMatchpair()
|
||||||
\ || (s:g('expand_cr') == 2
|
\ || (s:g('expand_cr') == 2
|
||||||
\ && index(s:g('right_delims'), delimitMate#GetCharFromCursor(0)) > -1)
|
\ && index(s:g('right_delims'), delimitMate#GetCharFromCursor(0)) > -1)
|
||||||
\ || (s:g('expand_inside_quotes')
|
\ || (s:g('expand_inside_quotes')
|
||||||
\ && delimitMate#WithinEmptyQuotes()
|
\ && delimitMate#WithinEmptyQuotes()
|
||||||
\ && !escaped)
|
\ && !escaped))
|
||||||
" Expand:
|
" Expand:
|
||||||
" XXX zv prevents breaking expansion with syntax folding enabled by
|
" XXX zv prevents breaking expansion with syntax folding enabled by
|
||||||
" InsertLeave.
|
" InsertLeave.
|
||||||
|
|||||||
Reference in New Issue
Block a user