GDScript: Track columns by raw string offsets

This commit is contained in:
HolonProduction
2026-03-02 23:20:25 +01:00
parent 6d6e822c68
commit 612475a680
15 changed files with 107 additions and 279 deletions
@@ -546,8 +546,6 @@ Array GDScriptLanguageProtocol::lsp_completion(const Dictionary &p_params) {
List<ScriptLanguage::CodeCompletionOption> options;
get_workspace()->completion(params, &options);
const Vector<String> &lines = get_parse_result(workspace->get_file_path(params.textDocument.uri))->get_lines();
if (!options.is_empty()) {
int i = 0;
arr.resize(options.size());
@@ -573,7 +571,7 @@ Array GDScriptLanguageProtocol::lsp_completion(const Dictionary &p_params) {
if (option.text_edit.is_set()) {
GodotRange range(GodotPosition(option.text_edit.start_line, option.text_edit.start_column), GodotPosition(option.text_edit.end_line, option.text_edit.end_column));
item.textEdit.newText = option.text_edit.new_text;
item.textEdit.range = range.to_lsp(lines);
item.textEdit.range = range.to_lsp();
}
switch (option.kind) {