Skip to content

Commit

Permalink
Fix #174 check virtualcol()
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Apr 15, 2020
1 parent eb2307c commit bbec852
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autoload/deoplete/handler.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bbec852

Please sign in to comment.