aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-11 16:29:52 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-11 16:32:52 -0400
commit700d8848c751b48879ae75ff5ccb3fe7c3fa1481 (patch)
tree0352ff4e75850b1492785f1ec1949cbf23798fe4 /src
parentf09e5fc3379ae4e706193ee777028c47293c9335 (diff)
Fix issue with the LSP incorrectly inferring positions if the file started with an empty line
Diffstat (limited to 'src')
-rw-r--r--src/common/position.odin2
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) {