Skip to content

Commit

Permalink
Fix line length to never be below 0
Browse files Browse the repository at this point in the history
Fixes #74
  • Loading branch information
pappasam committed Feb 22, 2021
1 parent 849852d commit 2641846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jedi_language_server/jedi_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def line_column(jedi_script: Script, position: Position) -> Dict[str, int]:
line_length = len(lines[position.line])
return dict(
line=position.line + 1,
column=min(position.character, line_length - 1),
column=min(position.character, line_length - 1 if line_length else 0),
)


Expand Down

0 comments on commit 2641846

Please sign in to comment.