src/Builder4/Editor.bjs
authorAlan Knowles <alan@roojs.com>
Sat, 23 Mar 2024 07:46:36 +0000 (15:46 +0800)
committerAlan Knowles <alan@roojs.com>
Sat, 23 Mar 2024 07:46:36 +0000 (15:46 +0800)
src/Builder4/Editor.vala

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

index 2f0cee8..38be8d4 100644 (file)
                    "\tif (added  < 1) {",
                    "\t\treturn;",
                    "\t}",
-                   "\tvar sym = (Lsp.DocumentSymbol) this.el.get_item(position);",
+                   "\t//var sym = (Lsp.DocumentSymbol) this.el.get_item(position);",
                    "\tvar row = this.el.get_row(position);",
+                   "\tvar sym = (Lsp.DocumentSymbol)  row.get_item();",
                    "\tswitch (sym.kind) {",
                    " \t\tcase Lsp.SymbolKind.Enum: ",
                    " \t\t\trow.expanded = false;",
index 302e1b4..bbdedc1 100644 (file)
@@ -2235,8 +2235,9 @@ public class Editor : Object
                                if (added  < 1) {
                                        return;
                                }
-                               var sym = (Lsp.DocumentSymbol) this.el.get_item(position);
+                               //var sym = (Lsp.DocumentSymbol) this.el.get_item(position);
                                var row = this.el.get_row(position);
+                               var sym = (Lsp.DocumentSymbol)  row.get_item();
                                switch (sym.kind) {
                                        case Lsp.SymbolKind.Enum: 
                                                row.expanded = false;