src/Builder4/GtkView.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 19 Jan 2024 00:26:24 +0000 (08:26 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 19 Jan 2024 00:26:24 +0000 (08:26 +0800)
src/Builder4/GtkView.vala

src/Builder4/GtkView.bjs
src/Builder4/GtkView.vala

index 140033f..84caec7 100644 (file)
                "    this.el.get_iter_at_offset(out cpos, this.el.cursor_position);",
                "    ",
                "    var ln = cpos.get_line();",
-               "",
+               "    if (this.last_line = ln ){",
+               "    \treturn;",
+               "\t}",
+               "\tthis.last_line = ln;",
                "    var node = _this.file.lineToNode(ln);",
                "",
                "    if (node == null) {",
index 931d6d4..18b6d14 100644 (file)
@@ -932,7 +932,10 @@ public class Xcls_GtkView : Object
                            this.el.get_iter_at_offset(out cpos, this.el.cursor_position);
                            
                            var ln = cpos.get_line();
-                       
+                           if (this.last_line = ln ){
+                               return;
+                               }
+                               this.last_line = ln;
                            var node = _this.file.lineToNode(ln);
                        
                            if (node == null) {