From 700d8848c751b48879ae75ff5ccb3fe7c3fa1481 Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Wed, 11 Jun 2025 16:29:52 -0400 Subject: Fix issue with the LSP incorrectly inferring positions if the file started with an empty line --- src/common/position.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') 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) { -- cgit v1.2.3