Check that the goto definition cursor is within bounds
This commit is contained in:
parent
44f33c631b
commit
2eab5e036d
@ -283,6 +283,7 @@ fn nodeToCompletion(list: *std.ArrayList(types.CompletionItem), analysis_ctx: *D
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn identifierFromPosition(pos_index: usize, handle: DocumentStore.Handle) []const u8 {
|
fn identifierFromPosition(pos_index: usize, handle: DocumentStore.Handle) []const u8 {
|
||||||
|
if (pos_index + 1 >= handle.document.text.len) return &[0]u8{};
|
||||||
var start_idx = pos_index;
|
var start_idx = pos_index;
|
||||||
|
|
||||||
while (start_idx > 0 and
|
while (start_idx > 0 and
|
||||||
|
Loading…
Reference in New Issue
Block a user