summaryrefslogtreecommitdiff
path: root/autoload/deoplete/handler.vim
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2020-04-15 09:49:56 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2020-04-15 09:49:56 +0900
commitbbec852adee45a1500fa817a3c17889dc328cad0 (patch)
tree18cfc5ed3189d5ff111f3b9dbc57ba94109bed4d /autoload/deoplete/handler.vim
parenteb2307cfa84280041bc294e2091cee40a9183db8 (diff)
downloaddeoplete.nvim-bbec852adee45a1500fa817a3c17889dc328cad0.zip
Fix #174 check virtualcol()
Diffstat (limited to 'autoload/deoplete/handler.vim')
-rw-r--r--autoload/deoplete/handler.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/autoload/deoplete/handler.vim b/autoload/deoplete/handler.vim
index 61fe91a..49a8cd2 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