diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-11 16:29:52 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-11 16:32:52 -0400 |
| commit | 700d8848c751b48879ae75ff5ccb3fe7c3fa1481 (patch) | |
| tree | 0352ff4e75850b1492785f1ec1949cbf23798fe4 /src/common | |
| parent | f09e5fc3379ae4e706193ee777028c47293c9335 (diff) | |
Fix issue with the LSP incorrectly inferring positions if the file started with an empty line
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/position.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/position.odin b/src/common/position.odin index fca82b0..1eecfdc 100644 --- a/src/common/position.odin +++ b/src/common/position.odin @@ -43,7 +43,7 @@ get_absolute_position :: proc(position: Position, document_text: []u8) -> (Absol } line_count := 0 - index := 1 + index := 0 last := document_text[0] if !get_index_at_line(&index, &line_count, &last, document_text, position.line) { |