src/Builder4/Editor.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 26 Mar 2024 15:13:34 +0000 (23:13 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 26 Mar 2024 15:13:34 +0000 (23:13 +0800)
src/Builder4/Editor.vala

src/Builder4/Editor.bjs
src/Builder4/Editor.vala

index 473d476..c455ab9 100644 (file)
@@ -63,7 +63,8 @@
            "xtype" : "Label",
            "| void setHelp" : [
             "(Lsp.Hover? help) {",
-            "\tif (help == null || help.contents == null) {",
+            "\tif (help == null || help.contents == null",
+            "\t\t|| help.contents.size < 1) {",
             "\t\tthis.el.set_text(\"\");",
             "\t\treturn;",
             "\t}",
index 0d3173a..411a985 100644 (file)
@@ -545,7 +545,8 @@ public class Editor : Object
 
                // user defined functions
                public void setHelp (Lsp.Hover? help) {
-                       if (help == null || help.contents == null) {
+                       if (help == null || help.contents == null
+                               || help.contents.size < 1) {
                                this.el.set_text("");
                                return;
                        }