Fix :ALEImport column position

Fix :ALEImport column position so it works with more language servers.

Co-authored-by: w0rp <devw0rp@gmail.com>
This commit is contained in:
yoshi1123
2022-03-20 09:20:33 -04:00
committed by w0rp
parent 560e6340ce
commit 7e2342ab52
2 changed files with 14 additions and 13 deletions

View File

@@ -911,7 +911,8 @@ function! ale#completion#Import() abort
endif
let [l:line, l:column] = getpos('.')[1:2]
let l:column = searchpos('\V' . escape(l:word, '/\'), 'bn', l:line)[1]
let l:column = searchpos('\V' . escape(l:word, '/\'), 'bnc', l:line)[1]
let l:column = l:column + len(l:word) - 1
if l:column isnot 0
let l:started = ale#completion#GetCompletions('ale-import', {