From bbec852adee45a1500fa817a3c17889dc328cad0 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Wed, 15 Apr 2020 09:49:56 +0900 Subject: [PATCH] Fix #174 check virtualcol() --- autoload/deoplete/handler.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/deoplete/handler.vim b/autoload/deoplete/handler.vim index 61fe91a5..49a8cd28 100644 --- a/autoload/deoplete/handler.vim +++ b/autoload/deoplete/handler.vim @@ -262,11 +262,13 @@ function! s:is_skip_text(event) abort endif let displaywidth = strdisplaywidth(input) + 1 + let is_virtual = virtcol('.') >= displaywidth if &l:formatoptions =~# '[tca]' && &l:textwidth > 0 \ && displaywidth >= &l:textwidth if &l:formatoptions =~# '[ta]' \ || !empty(filter(deoplete#util#get_syn_names(), \ "v:val ==# 'Comment'")) + \ || is_virtual return 1 endif endif