mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-09 05:54:45 +08:00
Fix #2257 - Fix an off by 1 which broke completion for some servers
This commit is contained in:
@@ -480,8 +480,8 @@ function! s:OnReady(linter, lsp_details, ...) abort
|
|||||||
\ b:ale_completion_info.line,
|
\ b:ale_completion_info.line,
|
||||||
\ min([
|
\ min([
|
||||||
\ b:ale_completion_info.line_length,
|
\ b:ale_completion_info.line_length,
|
||||||
\ b:ale_completion_info.column + 1,
|
\ b:ale_completion_info.column,
|
||||||
\ ]),
|
\ ]) + 1,
|
||||||
\ ale#completion#GetTriggerCharacter(&filetype, b:ale_completion_info.prefix),
|
\ ale#completion#GetTriggerCharacter(&filetype, b:ale_completion_info.prefix),
|
||||||
\)
|
\)
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ Execute(The right message should be sent for the initial LSP request):
|
|||||||
\ }],
|
\ }],
|
||||||
\ [0, 'textDocument/completion', {
|
\ [0, 'textDocument/completion', {
|
||||||
\ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
|
\ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
|
||||||
\ 'position': {'line': 0, 'character': 2},
|
\ 'position': {'line': 0, 'character': 3},
|
||||||
\ }],
|
\ }],
|
||||||
\ ],
|
\ ],
|
||||||
\ g:message_list
|
\ g:message_list
|
||||||
@@ -274,7 +274,7 @@ Execute(Two completion requests shouldn't be sent in a row):
|
|||||||
\ }],
|
\ }],
|
||||||
\ [0, 'textDocument/completion', {
|
\ [0, 'textDocument/completion', {
|
||||||
\ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
|
\ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
|
||||||
\ 'position': {'line': 0, 'character': 2},
|
\ 'position': {'line': 0, 'character': 3},
|
||||||
\ }],
|
\ }],
|
||||||
\ ],
|
\ ],
|
||||||
\ g:message_list
|
\ g:message_list
|
||||||
|
|||||||
Reference in New Issue
Block a user