You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this breaks code completion (and possibly other features) at the beginning of the line.
If the line is empty you get the following traceback instead of getting the list for the beginning of the line (globals, builtins, etc.) . e.g.
ERROR:pygls.protocol:Failed to handle request 15 textDocument/completion partial_result_token=None work_done_token=None text_document=TextDocumentIdentifier(uri='file:///C:/Users/kiria/Desktop/test.py') position=13:0 context=None
Traceback (most recent call last):
File "C:\ProgramData\PyScripter\Lsp\jls\jedilsp\pygls\protocol.py", line 331, in _handle_request
self._execute_request(msg_id, handler, params)
File "C:\ProgramData\PyScripter\Lsp\jls\jedilsp\pygls\protocol.py", line 260, in _execute_request
method_name, method_type, msg_id, handler(params))
File "C:\ProgramData\PyScripter\Lsp\jls\jedilsp\jedi_language_server\server.py", line 190, in completion
completions_jedi = jedi_script.complete(**jedi_lines)
File "C:\ProgramData\PyScripter\Lsp\jls\jedilsp\jedi\api\helpers.py", line 485, in wrapper
raise ValueError('`column` parameter (%d) is not in a valid range '
ValueError: `column` parameter (1) is not in a valid range (0-0) for line 14 ('\r\n').
If there is a character at the beginning of the line you get wrong completion for character position 1 instead of 0.
I also suspect that there is a logic error a couple of lines below:
Commit e4226c3 was meant to fix hover at the beginning of the line. It contains the following line in jedi_utils.py:
However this breaks code completion (and possibly other features) at the beginning of the line.
If the line is empty you get the following traceback instead of getting the list for the beginning of the line (globals, builtins, etc.) . e.g.
If there is a character at the beginning of the line you get wrong completion for character position 1 instead of 0.
I also suspect that there is a logic error a couple of lines below:
It does not account for Windows line endings '\r\n' which are two characters long.
The text was updated successfully, but these errors were encountered: