Browse Source

LSP: don't send empty completion command

(cherry picked from commit 5715d3eb593322d74994a1e979b3648f1fe3d9f4)
Александр Черник 2 years ago
parent
commit
b2364048d2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      modules/gdscript/language_server/godot_lsp.h

+ 3 - 1
modules/gdscript/language_server/godot_lsp.h

@@ -1005,7 +1005,9 @@ struct CompletionItem {
 			if (commitCharacters.size()) {
 				dict["commitCharacters"] = commitCharacters;
 			}
-			dict["command"] = command.to_json();
+			if (!command.command.is_empty()) {
+				dict["command"] = command.to_json();
+			}
 		}
 		return dict;
 	}