src/Builder4/GtkView.bjs wip_alan_T7369_fix_goto_line origin/wip_alan_T7369_fix_goto_line
authorAlan <alan@roojs.com>
Wed, 31 Aug 2022 08:47:14 +0000 (16:47 +0800)
committerAlan <alan@roojs.com>
Wed, 31 Aug 2022 08:47:14 +0000 (16:47 +0800)
src/Builder4/GtkView.vala

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

index 8fa5453..5d46166 100644 (file)
    ],
    "| void scroll_to_line" : [
     "(int line) {",
-    "   this.notebook.el.set_current_page(1);// code preview...",
+    "  // code preview...",
     "   ",
-    "   GLib.Timeout.add(500, () => {",
+    "   GLib.Timeout.add(100, () => {",
     "   ",
     "   ",
-    "\t   ",
+    "\t    this.notebook.el.set_current_page(1);",
     "\t   ",
     "\t\t  var buf = this.sourceview.el.get_buffer();",
     "\t ",
index c0ce31a..7991ac6 100644 (file)
@@ -321,12 +321,12 @@ public class Xcls_GtkView : Object
          
     }
     public void scroll_to_line (int line) {
-       this.notebook.el.set_current_page(1);// code preview...
+      // code preview...
        
-       GLib.Timeout.add(500, () => {
+       GLib.Timeout.add(100, () => {
        
        
-          
+           this.notebook.el.set_current_page(1);
           
                  var buf = this.sourceview.el.get_buffer();