src/Builder4/Editor.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 19 Mar 2024 14:30:44 +0000 (22:30 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 19 Mar 2024 14:30:44 +0000 (22:30 +0800)
src/Builder4/Editor.vala

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

index f8fc295..14f35db 100644 (file)
               ],
               "cursor_moved" : [
                "( ) => {",
+               "\tvar cp = _this.view.el.cursor_position;",
+               "\t TextIter iter",
+               "\t_this.view.el.et_iter_at_offset (",
+               "\t\t\tout TextIter iter, _this.view.el.cursor_position);",
+               "\tvar line =iter.get_line();",
+               "\t//_this.navigation.",
                "",
                "",
                "}",
index 9e5c49b..5f1be05 100644 (file)
@@ -927,6 +927,12 @@ public class Editor : Object
 
                        //listeners
                        this.el.cursor_moved.connect( ( ) => {
+                               var cp = _this.view.el.cursor_position;
+                                TextIter iter
+                               _this.view.el.et_iter_at_offset (
+                                               out TextIter iter, _this.view.el.cursor_position);
+                               var line =iter.get_line();
+                               //_this.navigation.
                        
                        
                        });