src/JsRender/Node.vala
authorAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 06:37:20 +0000 (14:37 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 06:37:20 +0000 (14:37 +0800)
src/JsRender/Node.vala

index f3e8c4c..3f793a5 100644 (file)
@@ -123,6 +123,8 @@ public class JsRender.Node : Object {
                this.line_end = -1;             
                this.lines = new Gee.ArrayList<int>();
                this.line_map = new Gee.HashMap<int,string>();
+               this.node_lines = new Gee.ArrayList<int>();
+               this.node_line_map = new Gee.HashMap<int,Node>();
                
        }
        
@@ -138,11 +140,9 @@ public class JsRender.Node : Object {
        public void sortLines() {
                this.lines.sort((a,b) => {   
                        return (int)a-(int)b;
-                       /*if (a == b) {
-                               return 0;
-                       }
-                       return a < b ? -1 : 1;
-                       */
+               });
+               this.node_lines.sort((a,b) => {   
+                       return (int)a-(int)b;
                });
        }