File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -859,11 +859,9 @@ pub fn completionAtIndex(
859859 };
860860 const source = handle .tree .source ;
861861
862- // Provide `top_level_decl_data` only if `offsets.lineSliceUntilIndex(handle.tree.source, source_index).len` is
863- // 0 => Empty new line, manually triggered
864- // 1 => This is the very first char on a given line
865- const at_line_start = offsets .lineSliceUntilIndex (source , source_index ).len < 2 ;
866- if (at_line_start ) {
862+ const line_until_index = offsets .lineSliceUntilIndex (source , source_index );
863+
864+ if (line_until_index .len == 0 or std .zig .isValidId (line_until_index )) {
867865 try populateSnippedCompletions (& builder , & snipped_data .top_level_decl_data );
868866 return .{ .isIncomplete = false , .items = builder .completions .items };
869867 }
You can’t perform that action at this time.
0 commit comments