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

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

index c3a02cf..0b1120f 100644 (file)
           "}"
          ],
          "| void updateSelectedLine" : [
-          "(int line) {",
+          "(uint line, uint chr) {",
           "\tif (line == this.last_selected_line) {",
           "\t\treturn;",
           "\t}",
-          "\tGLib.debug(\"select line %d\", line);",
+          "\tGLib.debug(\"select line %d\", (int)ine);",
           "\tthis.last_selected_line = line;",
           "\t",
           "\t",
           "\tvar new_row = -1;",
-          "\tvar sym = _this.navliststore.symbolAtLine(line);",
+          "\tvar sym = _this.navliststore.symbolAtLine(line,chr);",
           "\tif (sym != null) {",
           "\t \tnew_row = _this.navigationsort.getRowFromSymbol(sym);",
-          " \t\tGLib.debug(\"select line %d - row found %d\", line, new_row);",
+          " \t\tGLib.debug(\"select line %d - row found %d\", (int)line, new_row);",
           " \t} else {",
-          " \t\tGLib.debug(\" no symbol found at line %d\", line);",
+          " \t\tGLib.debug(\" no symbol found at line %d\", (int)line);",
           " \t}",
           " \t",
           "\tif (this.selected_row != null) { ",
index 3ea2307..2938729 100644 (file)
@@ -1901,21 +1901,21 @@ public class Editor : Object
                        } 
                        return rn;
                 }
-               public void updateSelectedLine (int line) {
+               public void updateSelectedLine (uint line, uint chr) {
                        if (line == this.last_selected_line) {
                                return;
                        }
-                       GLib.debug("select line %d", line);
+                       GLib.debug("select line %d", (int)ine);
                        this.last_selected_line = line;
                        
                        
                        var new_row = -1;
-                       var sym = _this.navliststore.symbolAtLine(line);
+                       var sym = _this.navliststore.symbolAtLine(line,chr);
                        if (sym != null) {
                                new_row = _this.navigationsort.getRowFromSymbol(sym);
-                               GLib.debug("select line %d - row found %d", line, new_row);
+                               GLib.debug("select line %d - row found %d", (int)line, new_row);
                        } else {
-                               GLib.debug(" no symbol found at line %d", line);
+                               GLib.debug(" no symbol found at line %d", (int)line);
                        }
                        
                        if (this.selected_row != null) {