<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,7 +13,7 @@ end
 
 if Redcar::App.ARGV.include? &quot;--test-perf-load&quot;
   new_tab = Redcar.new_tab
-  new_tab.filename = &quot;/home/dan/projects/redcar/freebase2/lib/freebase/readers.rb&quot;  
+  new_tab.filename = &quot;/home/dan/projects/rak/bin/rak&quot;  
   RubyProf.start
   new_tab.load  
   result = RubyProf.stop</diff>
      <filename>.Redcar/startup.rb</filename>
    </modified>
    <modified>
      <diff>@@ -666,16 +666,24 @@ static VALUE rb_scope_at(VALUE self, VALUE rb_loc) {
   }
 }
 
-static VALUE rb_scope_first_child_after(VALUE self, VALUE rb_loc) {
+static VALUE rb_scope_first_child_after(VALUE self, VALUE rb_loc, VALUE rb_starting_child) {
   Scope *s, *child;
+  Scope *starting_child = NULL;
   ScopeData *sd;
   TextLoc *loc;
   TextLoc c_start;
   Data_Get_Struct(self, Scope, s);
   Data_Get_Struct(rb_loc, TextLoc, loc);
+  if (rb_starting_child != Qnil)
+    Data_Get_Struct(rb_starting_child, Scope, starting_child);
   if (g_node_n_children(s) == 0)
     return Qnil;
-  child = g_node_first_child(s);
+  if (starting_child &amp;&amp; starting_child-&gt;parent == s) {
+    child = starting_child;
+  }
+  else {
+    child = g_node_first_child(s);
+  }
   while (child != NULL) {
     sd = child-&gt;data;
     scope_start_loc(child, &amp;c_start);
@@ -752,17 +760,26 @@ static VALUE rb_scope_detach(VALUE self) {
   return Qtrue;
 }
 
-static VALUE rb_scope_delete_any_on_line_not_in(VALUE self, VALUE line_num, VALUE scopes) {
+static VALUE rb_scope_delete_any_on_line_not_in(VALUE self, VALUE line_num, 
+                                                VALUE scopes, VALUE rb_starting_child) {
   if (self == Qnil || line_num == Qnil || scopes == Qnil)
     printf(&quot;rb_scope_delete_any_on_line_not_in(nil, or nil, or nil)&quot;);
   Scope *s, *c, *cn, *s1;
   ScopeData *sdc;
+  Scope *starting_child = NULL;
+  if (rb_starting_child != Qnil)
+    Data_Get_Struct(rb_starting_child, Scope, starting_child);
   Data_Get_Struct(self, Scope, s);
   int num = FIX2INT(line_num);
   int i, j, remove;
   VALUE rs1;
-  TextLoc start;
-  c = g_node_first_child(s);
+  TextLoc start_iter;
+  if (starting_child &amp;&amp; starting_child-&gt;parent == s) {
+    c = starting_child;
+  }
+  else {
+    c = g_node_first_child(s);
+  }
   VALUE rb_removed = rb_ary_new();
   while (c != NULL) {
     sdc = c-&gt;data;
@@ -918,15 +935,21 @@ static VALUE rb_scope_hierarchy_names(VALUE self, VALUE rb_inner) {
 /*   return 1; */
 /* } */
 
-static VALUE rb_scope_remove_children_that_overlap(VALUE self, VALUE rb_other) {
+static VALUE rb_scope_remove_children_that_overlap(VALUE self, VALUE rb_other, VALUE rb_starting_child) {
   Scope *scope, *other;
+  Scope *starting_child = NULL;
   Data_Get_Struct(self, Scope, scope);
   Data_Get_Struct(rb_other, Scope, other);
+  if (rb_starting_child != Qnil)
+    Data_Get_Struct(rb_starting_child, Scope, starting_child);
   //  scope_remove_children_that_overlap(scope, other);
   ScopeData *od = other-&gt;data;
   Scope *child;
   ScopeData *child_data;
-  child = g_node_first_child(scope);
+  if (starting_child &amp;&amp; starting_child-&gt;parent == scope)
+    child = starting_child;
+  else
+    child = g_node_first_child(scope);
   VALUE rb_removed = rb_ary_new();
   while (child != NULL) {
     child_data = child-&gt;data;
@@ -1076,14 +1099,14 @@ void colour_scope(GtkTextBuffer* buffer, Scope* scope, VALUE theme, int inner) {
     // set name
     rba_settings = rb_funcall(theme, rb_intern(&quot;settings_for_scope&quot;), 2, sd-&gt;rb_scope, (inner ? Qtrue : Qnil));
     if (RARRAY(rba_settings)-&gt;len == 0) {
-      snprintf(tag_name, 250, &quot;EditView:default (%d)&quot;, priority-1);
+      snprintf(tag_name, 250, &quot;EditView(%d):default&quot;, priority-1);
     }
     else {
       rbh_setting = rb_ary_entry(rba_settings, 0);
       rb_settings = rb_hash_aref(rbh_setting, rb_str_new2(&quot;settings&quot;));
       rb_settings_scope = rb_hash_aref(rbh_setting, rb_str_new2(&quot;scope&quot;));
       rb_scope_id = rb_funcall(sd-&gt;rb_scope, rb_intern(&quot;scope_id&quot;), 0);
-      snprintf(tag_name, 250, &quot;EditView:%s (%d)&quot;, 
+      snprintf(tag_name, 250, &quot;EditView(%d):%s &quot;, 
 	       RSTRING_PTR(rb_settings_scope), priority-1);
       rbh_tag_settings = rb_funcall(theme, rb_intern(&quot;textmate_settings_to_pango_options&quot;), 1, rb_settings);
     }
@@ -1116,15 +1139,11 @@ void colour_scope(GtkTextBuffer* buffer, Scope* scope, VALUE theme, int inner) {
   return;
 }
 
-static VALUE rb_colour_line_with_scopes(VALUE self, VALUE rb_colourer, VALUE theme,
-					VALUE scopes) {
-  VALUE rb_buffer;
+static VALUE rb_colour_line_with_scopes(VALUE self, VALUE rb_buffer, 
+                                        VALUE theme, VALUE scopes) {
   GtkTextBuffer* buffer;
   GtkTextIter start_iter, end_iter;
 
-  // remove all tags from line
-  rb_buffer = rb_funcall(rb_iv_get(rb_colourer, &quot;@sourceview&quot;), rb_intern(&quot;buffer&quot;), 0);
-  
   buffer = (GtkTextBuffer *) get_gobject(rb_buffer);
 
   // colour each scope
@@ -1226,6 +1245,7 @@ typedef struct LineParser_ {
   VALUE  sm_matchdata;
   Scope* current_scope;
   int    sm_hint;
+  Scope* starting_child;
 } LineParser;
 
 void rb_line_parser_mark(LineParser* lp) {
@@ -1245,7 +1265,8 @@ static VALUE rb_line_parser_alloc(VALUE klass) {
 
 static VALUE rb_line_parser_init(VALUE self, VALUE parser,
                                  VALUE line_num, VALUE line, 
-                                 VALUE opening_scope) {
+                                 VALUE opening_scope,
+                                 VALUE last_child) {
   LineParser *lp;
   Data_Get_Struct(self, LineParser, lp);
   lp-&gt;line_length = RSTRING_LEN(line);
@@ -1253,8 +1274,9 @@ static VALUE rb_line_parser_init(VALUE self, VALUE parser,
   lp-&gt;pos         = 0;
   lp-&gt;has_scope_marker = 0;
   lp-&gt;current_scope = NULL;
-  rb_funcall(self, rb_intern(&quot;initialize2&quot;), 3, 
-             parser, line, opening_scope);
+  lp-&gt;starting_child = NULL;
+  rb_funcall(self, rb_intern(&quot;initialize2&quot;), 4, 
+             parser, line, opening_scope, last_child);
   return self;
 }
 
@@ -1302,6 +1324,31 @@ static VALUE rb_line_parser_set_current_scope(VALUE self, VALUE rb_scope) {
   return Qtrue;
 }
 
+static VALUE rb_line_parser_get_starting_child(VALUE self) {
+  LineParser *lp;
+  Data_Get_Struct(self, LineParser, lp);
+  Scope *s;
+  ScopeData *sd;
+  if (lp-&gt;starting_child == NULL)
+    return Qnil;
+  s = lp-&gt;starting_child;
+  sd = s-&gt;data;
+  return sd-&gt;rb_scope;
+}
+
+static VALUE rb_line_parser_set_starting_child(VALUE self, VALUE rb_scope) {
+  LineParser *lp;
+  Data_Get_Struct(self, LineParser, lp);
+  if (rb_scope == Qnil) {
+    lp-&gt;starting_child = NULL;
+    return;
+  }
+  Scope *s;
+  Data_Get_Struct(rb_scope, Scope, s);
+  lp-&gt;starting_child = s;
+  return Qtrue;
+}
+
 static VALUE rb_line_parser_reset_scope_marker(VALUE self) {
   LineParser *lp;
   Data_Get_Struct(self, LineParser, lp);
@@ -1480,8 +1527,17 @@ static VALUE rb_line_parser_scan_line(VALUE self) {
   return Qnil;
 }
 
+static VALUE rb_document_create_anonymous_mark(VALUE self, VALUE rb_iter) {
+  GtkTextBuffer *buffer;
+  buffer = (GtkTextBuffer *) get_gobject(self);
+  gtk_text_buffer_create_mark         (buffer,
+                                                         const gchar *mark_name,
+                                                         const GtkTextIter *where,
+                                                         gboolean left_gravity)
+}
+
 static VALUE mSyntaxExt, rb_mRedcar, rb_cEditView, rb_cParser;
-static VALUE cScope, cTextLoc, cLineParser;
+static VALUE cScope, cTextLoc, cLineParser, cDocument;
 
 void Init_syntax_ext() {
   // utility functions are in SyntaxExt
@@ -1544,7 +1600,7 @@ void Init_syntax_ext() {
   rb_define_method(cScope, &quot;children&quot;,  rb_scope_get_children, 0);
   rb_define_method(cScope, &quot;parent&quot;,  rb_scope_get_parent, 0);
   rb_define_method(cScope, &quot;scope_at&quot;,  rb_scope_at, 1);
-  rb_define_method(cScope, &quot;first_child_after&quot;,  rb_scope_first_child_after, 1);
+  rb_define_method(cScope, &quot;first_child_after&quot;,  rb_scope_first_child_after, 2);
   rb_define_method(cScope, &quot;clear_after&quot;,  rb_scope_clear_after, 1);
   rb_define_method(cScope, &quot;clear_between&quot;,  rb_scope_clear_between, 2);
   rb_define_method(cScope, &quot;clear_between_lines&quot;,  rb_scope_clear_between_lines, 2);
@@ -1552,21 +1608,23 @@ void Init_syntax_ext() {
   rb_define_method(cScope, &quot;n_children&quot;,  rb_scope_n_children, 0);
   rb_define_method(cScope, &quot;detach&quot;,  rb_scope_detach, 0);
   rb_define_method(cScope, &quot;delete_any_on_line_not_in&quot;,  
-                   rb_scope_delete_any_on_line_not_in, 2);
+                   rb_scope_delete_any_on_line_not_in, 3);
   rb_define_method(cScope, &quot;clear_not_on_line&quot;,  rb_scope_clear_not_on_line, 1);
-  rb_define_method(cScope, &quot;remove_children_that_overlap&quot;, rb_scope_remove_children_that_overlap, 1);
+  rb_define_method(cScope, &quot;remove_children_that_overlap&quot;, rb_scope_remove_children_that_overlap, 2);
   rb_define_method(cScope, &quot;hierarchy_names&quot;,  rb_scope_hierarchy_names, 1);
 
   rb_cParser = rb_eval_string(&quot;Redcar::EditView::Parser&quot;);
   cLineParser = rb_define_class_under(rb_cParser, &quot;LineParser&quot;, rb_cObject);
   rb_define_alloc_func(cLineParser, rb_line_parser_alloc);
-  rb_define_method(cLineParser, &quot;initialize&quot;, rb_line_parser_init, 4);
+  rb_define_method(cLineParser, &quot;initialize&quot;, rb_line_parser_init, 5);
   rb_define_method(cLineParser, &quot;line_length&quot;, rb_line_parser_line_length, 0);
   rb_define_method(cLineParser, &quot;line_num&quot;, rb_line_parser_line_num, 0);
   rb_define_method(cLineParser, &quot;pos&quot;, rb_line_parser_get_pos, 0);
   rb_define_method(cLineParser, &quot;pos=&quot;, rb_line_parser_set_pos, 1);
   rb_define_method(cLineParser, &quot;current_scope&quot;, rb_line_parser_get_current_scope, 0);
   rb_define_method(cLineParser, &quot;current_scope=&quot;, rb_line_parser_set_current_scope, 1);
+  rb_define_method(cLineParser, &quot;starting_child&quot;, rb_line_parser_get_starting_child, 0);
+  rb_define_method(cLineParser, &quot;starting_child=&quot;, rb_line_parser_set_starting_child, 1);
   rb_define_method(cLineParser, &quot;reset_scope_marker&quot;, rb_line_parser_reset_scope_marker, 0);
   rb_define_method(cLineParser, &quot;any_markers?&quot;, rb_line_parser_any_scope_markers, 0);
   rb_define_method(cLineParser, &quot;get_scope_marker&quot;, rb_line_parser_get_scope_marker, 0);
@@ -1574,5 +1632,8 @@ void Init_syntax_ext() {
   rb_define_method(cLineParser, &quot;current_scope_closes?&quot;, rb_line_parser_current_scope_closes, 0);
   rb_define_method(cLineParser, &quot;match_pattern&quot;, rb_line_parser_match_pattern, 1);
   rb_define_method(cLineParser, &quot;scan_line&quot;, rb_line_parser_scan_line, 0);
+
+  rb_cDocument = rb_eval_string(&quot;Redcar::Document&quot;);
+  rb_define_method(rb_cDocument, &quot;create_anonymous_mark&quot;, rb_document_create_anonymous_mark, 1);
 }
 </diff>
      <filename>plugins2/core/edit_view/ext/syntax_ext.c</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,7 @@ class Redcar::EditView
       @max_view = 200
       @changes = []
       @scope_last_line = 0
+      @last_childs = []
       @parse_all = true
       @cursor_line = 0
       connect_buffer_signals
@@ -59,7 +60,7 @@ class Redcar::EditView
         false
       end
       @buf.tag_table.signal_connect_after(&quot;tag_added&quot;) do |_, tag|
-        if tag.name =~ /^EditView/
+        if tag.name =~ /^EditView\((\d+)\)/
           @tags &lt;&lt; tag
         end
         reset_table_priorities
@@ -94,8 +95,7 @@ class Redcar::EditView
       scopes = nil
       @buf.line_count.times do |line_num|
         scopes = @root.descendants_on_line(line_num)
-        SyntaxExt.colour_line_with_scopes(@colourer, @colourer.theme, 
-                                          scopes)
+        SyntaxExt.colour_line_with_scopes(@buf, @colourer.theme, scopes)
       end
     end
     
@@ -191,6 +191,7 @@ class Redcar::EditView
       (lines-1).times do 
         @ending_scopes.insert(loc.line, nil)
         @starting_scopes.insert(loc.line, nil)
+        @last_childs.insert(loc.line, nil)
       end
       #puts &quot;@root.shift_chars(#{loc.line+lines-1}, #{end_loc.offset-loc.offset}, #{loc.offset})&quot;
 #      @root.shift_chars(loc.line+lines-1, end_loc.offset-loc.offset, loc.offset)
@@ -235,6 +236,7 @@ class Redcar::EditView
       (to.line-from.line-1).times do
         @ending_scopes.delete_at(from.line)
         @starting_scopes.delete_at(from.line)
+        @last_childs.delete_at(from.line)
       end
       line_num = from.line
       lazy_parse_from(line_num)
@@ -285,8 +287,10 @@ class Redcar::EditView
         opening_scope = (@ending_scopes[line_num-1] || @root)
       end
       @starting_scopes[line_num] = opening_scope
-      
-      lp = LineParser.new(self, line_num, line.to_s, opening_scope)
+      last_child = if line_num &gt; 0
+                     @last_childs[line_num-1]
+                   end
+      lp = LineParser.new(self, line_num, line.to_s, opening_scope, last_child)
       
 #       begin
         while lp.any_line_left?
@@ -319,10 +323,17 @@ class Redcar::EditView
 #         end
 #       p lp.all_scopes.length
 #        lp.all_scopes.each {|sc| sc.name }
-        SyntaxExt.colour_line_with_scopes(@colourer, @colourer.theme, 
+        children_of_current = lp.all_scopes.select do |s| 
+          s.parent == lp.current_scope
+        end
+        unless children_of_current.empty?
+          @last_childs[line_num] = children_of_current.last.
+            ancestral_child_of(lp.current_scope)
+        end
+        SyntaxExt.colour_line_with_scopes(@buf, @colourer.theme, 
                                           lp.all_scopes)
 #        debug_print_tag_table
-        reset_table_priorities
+#        reset_table_priorities
       end
       
       # should we parse the next line? If we've changed the scope or the 
@@ -377,11 +388,12 @@ class Redcar::EditView
     end
 
     class LineParser
-      attr_accessor(:start_scope, :active_grammar,
+      attr_accessor(:start_scope, :active_grammar, 
                     :all_scopes, :closed_scopes, :matching_patterns,
                     :need_new_patterns, :new_scope_markers, :removed_scopes)
+      attr_reader :current_child
       
-      def initialize2(p, line, opening_scope)
+      def initialize2(p, line, opening_scope, last_child_prev_line)
         @parser = p
         @start_scope = (opening_scope || p.scope_at_line_start(line_num))
         self.current_scope = @start_scope
@@ -393,6 +405,7 @@ class Redcar::EditView
         @need_new_patterns = true
         @new_scope_markers = []
         @removed_scopes = []
+        self.starting_child = last_child_prev_line
         reset_scope_marker
       end
       
@@ -436,7 +449,7 @@ class Redcar::EditView
       end
       
       def get_expected_scope
-        expected_scope = current_scope.first_child_after(TextLoc.new(line_num, pos))
+        expected_scope = current_scope.first_child_after(TextLoc.new(line_num, pos), starting_child)
         if expected_scope
           expected_scope = nil unless expected_scope.start.line == line_num
         end
@@ -526,8 +539,8 @@ class Redcar::EditView
         from_loc = TextLoc.new(line_num, nsm[:from])
         new_scope.start_mark = @parser.buf.create_anonymous_mark(@parser.buf.iter(from_loc))
         new_scope.inner_start_mark = @parser.buf.create_anonymous_mark(@parser.buf.iter(to_loc))
-        new_scope.inner_end_mark = @parser.buf.create_anonymous_mark(@parser.buf.iter(@parser.buf.char_count))
-        new_scope.end_mark = @parser.buf.create_anonymous_mark(@parser.buf.iter(@parser.buf.char_count))
+        new_scope.inner_end_mark = @parser.buf.end_mark
+        new_scope.end_mark = @parser.buf.end_mark
         
         new_scope.open_matchdata = nsm[:md]
         re = Oniguruma::ORegexp.new(@parser.build_closing_regexp(pattern, 
@@ -548,7 +561,7 @@ class Redcar::EditView
       end
       
       def remove_children_that_overlap_with(new_scope)
-        arr = current_scope.remove_children_that_overlap(new_scope)
+        arr = current_scope.remove_children_that_overlap(new_scope, starting_child)
         @removed_scopes += arr
       end
       
@@ -644,7 +657,7 @@ class Redcar::EditView
 #           p all_scopes
           # If we are reparsing, we might find that some scopes have disappeared,
           # delete them:
-          arr = current_scope.root.delete_any_on_line_not_in(line_num, all_scopes)
+          arr = current_scope.root.delete_any_on_line_not_in(line_num, all_scopes, starting_child)
           @removed_scopes += arr
           
           # any that we expected to close on this line that now don't?
@@ -676,10 +689,12 @@ class Redcar::EditView
       if line_num == 0
         @ending_scopes = []
         @starting_scopes = []
+        @last_childs = []
         @scope_last_line = -1
       else
         @ending_scopes = @ending_scopes[0..(line_num-1)]
         @starting_scopes = @starting_scopes[0..(line_num-1)]
+        @last_childs = @last_childs[0..(line_num-1)]
         @scope_last_line = line_num-1
       end
     end</diff>
      <filename>plugins2/core/edit_view/parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -166,6 +166,16 @@ class Redcar::EditView
       parent == other or (parent and parent.child_of?(other))
     end
     
+    def ancestral_child_of(other)
+      if self.parent == nil
+        nil
+      elsif self.parent == other
+        self
+      else
+        self.parent.ancestral_child_of(other)
+      end
+    end
+    
     # Return the names of all scopes in the hierarchy above this scope. Inner 
     # is true or false depending on whether you want to include this scopes
     # 'inner' scope (content_name scope).
@@ -511,6 +521,10 @@ class Redcar::EditView
       end
     end
     
+    def root?
+      !parent.to_bool
+    end
+    
     def root
       if parent
         parent.root</diff>
      <filename>plugins2/core/edit_view/scope.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,46 +40,46 @@ module Redcar::Tests
       @lisp_grammar = Redcar::Tests::GrammarTests.lisp_grammar
     end
 
-    def atest_signals_connected1
+    def test_signals_connected1
       @parser.expects(:store_insertion)
       @buf.insert(@buf.iter(0), &quot;hi&quot;)
     end
     
-    def atest_signals_connected2
+    def test_signals_connected2
       @parser.expects(:process_changes)      
       @buf.insert(@buf.iter(0), &quot;hi&quot;)
     end
     
-    def atest_inserts_a_line_from_nothing
+    def test_inserts_a_line_from_nothing
       @buf.insert(@buf.iter(0), &quot;class &lt; Red&quot;)
       assert_equal 3, @root.children.length
     end
     
-    def atest_inserts_a_couple_of_lines_from_nothing
+    def test_inserts_a_couple_of_lines_from_nothing
       @buf.insert(@buf.iter(0), &quot;class &lt; Red\nend&quot;)
       assert_equal 4, @root.children.length
     end
     
-    def atest_inserts_a_line_between_two_lines
+    def test_inserts_a_line_between_two_lines
       @buf.insert(@buf.iter(0), &quot;class &lt; Red\nend&quot;)
       @buf.insert(@buf.iter(12), &quot;def foo\n&quot;)
       assert_equal 5, @root.children.length
     end
     
-    def atest_inserts_a_symbol_into_a_line
+    def test_inserts_a_symbol_into_a_line
       @buf.insert(@buf.iter(0), &quot;puts()&quot;)
       @buf.insert(@buf.iter(5), &quot;:symbol&quot;)
       assert_equal 3, @root.children.length
     end
     
-    def atest_deletes_a_symbol_from_a_line
+    def test_deletes_a_symbol_from_a_line
       @buf.insert(@buf.iter(0), &quot;puts(:symbol)&quot;)
       @buf.delete(@buf.iter(5), @buf.iter(12))
       assert_equal &quot;puts()&quot;, @buf.text
       assert_equal 2, @root.children.length
     end
     
-    def atest_deletes_a_whole_line
+    def test_deletes_a_whole_line
       @buf.insert(@buf.iter(0), &quot;class &lt; Red\ndef foo\nend&quot;)
       @buf.delete(@buf.iter(12), @buf.iter(20))
       assert_equal 4, @root.children.length
@@ -87,7 +87,7 @@ module Redcar::Tests
     
     # --- old tests ----
     
-    def atest_parser
+    def test_parser
       gr = Redcar::EditView::Grammar.new(@grammar1)
       sc = Redcar::EditView::Scope.new(:grammar =&gt; gr,
                                        :pattern =&gt; gr,
@@ -99,7 +99,7 @@ module Redcar::Tests
     end
     
     
-    def atest_parse_line_with_matches
+    def test_parse_line_with_matches
       line = &quot;asdf asdf if asdf asdf for asdfa asdf&quot;
       grh = { 
         &quot;name&quot; =&gt; &quot;Grammar Test&quot;,
@@ -117,7 +117,7 @@ module Redcar::Tests
       end
     end
     
-    def atest_parse_line_with_begin_ends
+    def test_parse_line_with_begin_ends
       line = &quot;asdf asdf if \&quot;asd\\\&quot;f asdf\&quot; for asdfa asdf&quot;
       grh = { 
         &quot;scopeName&quot; =&gt; &quot;source.example1&quot;,
@@ -143,7 +143,7 @@ module Redcar::Tests
       assert_equal &quot;constant.character.escape.untitled&quot;, smp.root.children[1].children[0].name
     end
     
-    def atest_parse_line_with_nested_begin_ends
+    def test_parse_line_with_nested_begin_ends
       line = &quot;asdf [ asdf { asdf asf } asfd asdfa ] asdf&quot;
       grh = { 
         &quot;scopeName&quot; =&gt; &quot;source.example1&quot;,
@@ -171,7 +171,7 @@ module Redcar::Tests
       assert_equal 0, ch1.children.length
     end
     
-    def atest_parse_line_with_repository
+    def test_parse_line_with_repository
       line = &quot;asd if f [ asdf if asdf { asdf if asf } asfd if asdfa ] asdf if adsf&quot;
       grh = { 
         &quot;scopeName&quot; =&gt; &quot;source.example1&quot;,
@@ -201,7 +201,7 @@ module Redcar::Tests
       assert_equal &quot;code.collection.set&quot;, smp.root.children[1].children[1].name
     end
     
-    def atest_parse_line_with_nesting
+    def test_parse_line_with_nesting
       line = &quot;asdf ( asdf ( asdf asf ) asfd asdfa ) asdf&quot;
       grh = { 
         &quot;scopeName&quot; =&gt; &quot;source.example1&quot;,
@@ -224,7 +224,7 @@ module Redcar::Tests
       assert_equal &quot;code.list&quot;, smp.root.children[0].children[0].name
     end
     
-    def atest_multiline_parsing
+    def test_multiline_parsing
       lines = &quot;asdf ( asdf ( asdf \nasf ) asfd asdfa ) asdf&quot;
       grh = { 
         &quot;scopeName&quot; =&gt; &quot;source.example1&quot;,
@@ -245,7 +245,7 @@ module Redcar::Tests
       assert_equal 1, smp.root.children[0].children.length
     end
     
-    def atest_parse_text_bug_for_included_base_pattern
+    def test_parse_text_bug_for_included_base_pattern
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       source=&lt;&lt;HI
@@ -256,7 +256,7 @@ HI
     end
     
     # Parse line should work repeatedly with no ill effects.
-    def atest_re_parse_line
+    def test_re_parse_line
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode=&quot;class Redcar::File\n  def nice_name\n    @filename.split(\&quot;asdf \#{foo} asdf\&quot;).last\n  end\nend\n&quot;
@@ -268,7 +268,7 @@ HI
     end
     
     # ... even when there are opening scopes in the line
-    def atest_re_parse_line_with_opening_scopes
+    def test_re_parse_line_with_opening_scopes
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode=&lt;&lt;P1END
@@ -286,7 +286,7 @@ P1END
     end
     
     # ... or closing scopes.
-    def atest_re_parse_line_with_closing_scopes
+    def test_re_parse_line_with_closing_scopes
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode=&lt;&lt;P2END
@@ -307,7 +307,7 @@ P2END
     # Reparsing should also work ok when there are new things. 
     
     # Like new single scopes ...
-    def atest_re_parse_line_with_extra_single_scopes
+    def test_re_parse_line_with_extra_single_scopes
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode=&lt;&lt;P2END
@@ -326,7 +326,7 @@ P2END
     
     # ... and new opening scopes. Here parse_line should return 
     # false to indicate the scope at the end of the line has changed ...
-    def atest_re_parse_line_with_extra_opening_scopes
+    def test_re_parse_line_with_extra_opening_scopes
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode=&quot;class Redcar::File\n  def nice_name\n    @filename.split(\&quot;asdf asdf\&quot;).last\n  end\nend\n&quot;
@@ -338,7 +338,7 @@ P2END
     end
     
     # ... and the same for new closing scopes. 
-    def atest_re_parse_line_with_extra_closing_scopes
+    def test_re_parse_line_with_extra_closing_scopes
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode=&lt;&lt;APE
@@ -358,7 +358,7 @@ APE
       assert_equal &quot;source.ruby&quot;, smp.root.line_end(4).name
     end
     
-    def atest_captures_are_children_for_single_scope
+    def test_captures_are_children_for_single_scope
       source=&lt;&lt;ENDSTR;
 ; Here is a comment
 (defun hello (x y)
@@ -372,7 +372,7 @@ ENDSTR
       assert_equal &quot;punctuation.definition.comment.lisp&quot;, smp.root.children[0].children[0].name
     end
     
-    def atest_captures_are_children_for_double_scope
+    def test_captures_are_children_for_double_scope
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode = &quot;puts \&quot;\#{1+2}\&quot;&quot;
@@ -389,7 +389,7 @@ ENDSTR
                    smp.root.children[0].children[1].children.map{|c| c.name})
     end
     
-    def atest_begin_and_end_captures_are_children_for_double_scope
+    def test_begin_and_end_captures_are_children_for_double_scope
       source=&lt;&lt;ENDSTR;
 ; Here is a comment
 (defun hello (x y)
@@ -411,7 +411,7 @@ ENDSTR
                    smp.root.children[2].end)
     end
     
-    def atest_lisp_grammar
+    def test_lisp_grammar
       source=&lt;&lt;ENDSTR;
 (car (1 2 3))
 ENDSTR
@@ -424,7 +424,7 @@ ENDSTR
       assert_equal &quot;constant.numeric.lisp&quot;, smp.root.children[1].name
     end  
     
-    def atest_ruby_syntax
+    def test_ruby_syntax
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
 
@@ -445,7 +445,7 @@ ENDSTR
       assert_equal 5, method_def_scope.end.offset
     end
     
-    def atest_ruby_syntax2
+    def test_ruby_syntax2
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode=&quot;class Redcar::File\n  def nice_name\n    @filename.split(\&quot;/\&quot;).last\n  end\nend&quot;
@@ -459,7 +459,7 @@ ENDSTR
       assert_equal 18, class_scope.children[1].end.offset
     end
 
-    def atest_build_closing_regexp
+    def test_build_closing_regexp
       hash = {
         &quot;scopeName&quot; =&gt; &quot;source.example1&quot;,
         &quot;patterns&quot; =&gt; [ 
@@ -476,7 +476,7 @@ ENDSTR
       assert_equal &quot;^END,FOR$&quot;, smp.build_closing_regexp(gr.pattern(&quot;text.heredoc&quot;), md)
     end
     
-    def atest_insert_text_in_line_that_contains_an_opening_scope
+    def test_insert_text_in_line_that_contains_an_opening_scope
       source=&lt;&lt;HILL
 puts &quot;hello&quot;
 foo=\&lt;\&lt;HI
@@ -498,7 +498,7 @@ HILL
       assert smp.root.children[1].end # heredoc is closed
     end
     
-    def atest_insert_text_in_line_that_appends_a_scope
+    def test_insert_text_in_line_that_appends_a_scope
       gr = @ruby_grammar
       buf, smp = ParserTests.clean_parser_and_buffer(gr)
       rubycode=&lt;&lt;SRC1
@@ -516,7 +516,7 @@ SRC1
                     assert_equal 13, smp.root.children.length
                   end
 
-def atest_insert_text_in_line_that_prepends_a_scope
+def test_insert_text_in_line_that_prepends_a_scope
   gr = @ruby_grammar
   buf, smp = ParserTests.clean_parser_and_buffer(gr)
   rubycode=&lt;&lt;SRC1
@@ -534,7 +534,7 @@ SRC1
     assert_equal 11, smp.root.children.length
   end
   
-  def atest_insert_text_in_line_that_adds_an_opening_scope
+  def test_insert_text_in_line_that_adds_an_opening_scope
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
 
@@ -555,7 +555,7 @@ SRC1
     assert_equal &quot;string.unquoted.heredoc.ruby&quot;, smp.root.children.last.name
   end
 
-  def atest_insert_text_in_line_that_adds_a_closing_scope
+  def test_insert_text_in_line_that_adds_a_closing_scope
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     rubycode=&lt;&lt;CRALL
@@ -575,7 +575,7 @@ CRALL
     assert_equal &quot;string.unquoted.heredoc.ruby&quot;, smp.root.children[1].name
   end
   
-  def atest_insert_text_in_line_repeated
+  def test_insert_text_in_line_repeated
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     initcode = &quot;# Comment line one\n# Comment line two\n&quot;
@@ -603,7 +603,7 @@ CRALL
                   new_scope.name])
   end
   
-  def atest_insert_text_in_line_repeated2
+  def test_insert_text_in_line_repeated2
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     &quot;puts \&quot;hello &quot;.split(//).each do |l|
@@ -627,7 +627,7 @@ CRALL
     assert_equal 3, str_scope.children.length
   end
   
-  def atest_insert_in_line_bug_with_comments
+  def test_insert_in_line_bug_with_comments
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     initcode = &quot;# Comment line one&quot;
@@ -638,7 +638,7 @@ CRALL
     assert_equal 2, smp.root.children.length
   end
   
-  def atest_delete_text_from_line
+  def test_delete_text_from_line
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     rubycode=&quot;class Redcar::File\n  def nice_name\n    @filename.split(\&quot;/\&quot;).last\n  end\nend\n&quot;
@@ -651,7 +651,7 @@ CRALL
     assert_equal old, smp.root.pretty2
   end
   
-  def atest_delete_text_that_opens_scope_from_line
+  def test_delete_text_that_opens_scope_from_line
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     rubycode=&lt;&lt;CROW
@@ -670,7 +670,7 @@ CROW
     assert_equal 9, smp.root.children.length
   end
   
-  def atest_delete_text_that_closes_scope_from_line
+  def test_delete_text_that_closes_scope_from_line
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     rubycode=&lt;&lt;CROW
@@ -689,7 +689,7 @@ CROW
     assert_equal 2, smp.root.children.length
   end
   
-  def atest_delete_return_from_line
+  def test_delete_return_from_line
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     rubycode = &quot;class Redcar::File\n  def nice_name\n    @filename.split(\&quot;/\&quot;).last\n  end\nend\n&quot;
@@ -699,7 +699,7 @@ CROW
     assert_equal 4, smp.root.children.length
   end
   
-  def atest_delete_line 
+  def test_delete_line 
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     rubycode = &quot;class Redcar::File\n  def nice_name\n    @filename.split(\&quot;/\&quot;).last\n  end\nend\n&quot;
@@ -710,7 +710,7 @@ CROW
     assert_equal 4, smp.root.children.length
   end
   
-  def atest_delete_line_that_opens_scope
+  def test_delete_line_that_opens_scope
     source=&lt;&lt;POOF
 puts &quot;hello&quot;
 foo=\&lt;\&lt;HI
@@ -728,7 +728,7 @@ POOF
     assert_equal 7, smp.root.children.length
   end
   
-  def atest_delete_line_that_closes_scope
+  def test_delete_line_that_closes_scope
     source=&lt;&lt;ENDSTR
 puts &quot;hello&quot;
 foo=&lt;&lt;HI
@@ -747,7 +747,7 @@ ENDSTR
     assert_equal [0, 1], smp.root.children.map{|c|c.start.line}
   end
   
-  def atest_insert_line
+  def test_insert_line
     source=&lt;&lt;LOKI
 puts &quot;hello&quot;
 foo=&lt;&lt;HI
@@ -767,7 +767,7 @@ LOKI
     assert_equal 5, smp.root.children.length
   end
   
-  def atest_parsing_inserted_line_that_opens_new_scope
+  def test_parsing_inserted_line_that_opens_new_scope
     source=&lt;&lt;LOKI
 puts &quot;hello&quot;
   Here.foo
@@ -783,7 +783,7 @@ LOKI
     assert_equal 2, smp.root.children.length
   end
   
-  def atest_parsing_inserted_line_that_closes_scope
+  def test_parsing_inserted_line_that_closes_scope
     source=&lt;&lt;LOKI
 puts &quot;hello&quot;
 foo=\&lt;\&lt;HI
@@ -800,7 +800,7 @@ LOKI
     assert_equal 3, smp.root.children.length
   end
   
-  def atest_insert
+  def test_insert
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     source=&lt;&lt;STR
@@ -828,7 +828,7 @@ STR
     assert_equal 19, smp.root.children.length
   end
 
-  def atest_insert_new_lines
+  def test_insert_new_lines
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     source=&lt;&lt;STR
@@ -903,7 +903,7 @@ BSTR
   end
   
 
-  def atest_bug
+  def test_bug
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     source=&lt;&lt;STR
@@ -929,7 +929,7 @@ STR
 #     assert_equal 2, smp.root.children[1].children.length
   end
 
-  def atest_embedded_grammar
+  def test_embedded_grammar
     gr = @ruby_grammar
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     source=&lt;&lt;STR
@@ -944,7 +944,7 @@ STR
     assert_equal &quot;meta.tag.block.any.html&quot;, smp.root.children[1].children[1].name
   end
   
-  def atest_embedded_grammar2
+  def test_embedded_grammar2
     gr = Redcar::EditView::Grammar.grammar :name =&gt; 'Ruby'
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     source=&lt;&lt;STR
@@ -958,7 +958,7 @@ STR
                  smp.root.children[1].children[2].children[1].name)
   end
   
-  def atest_embedded_grammar_delete_closing_scope
+  def test_embedded_grammar_delete_closing_scope
     gr = Redcar::EditView::Grammar.grammar :name =&gt; 'Ruby'
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     source=&lt;&lt;STR
@@ -976,7 +976,7 @@ STR
     assert_equal 2, smp.root.children.length
   end
   
-  def atest_duplicate_nonclosing_bug
+  def test_duplicate_nonclosing_bug
     gr = Redcar::EditView::Grammar.grammar :name =&gt; 'Ruby'
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     buf.text=(&quot;&quot;)
@@ -990,7 +990,7 @@ STR
     assert_equal 1, smp.root.children.length
   end
   
-  def atest_incremental_the_same_as_all_at_once
+  def test_incremental_the_same_as_all_at_once
     gr = Redcar::EditView::Grammar.grammar :name =&gt; 'Ruby'
     buf, smp = ParserTests.clean_parser_and_buffer(gr)
     source=&lt;&lt;STR</diff>
      <filename>plugins2/core/tests/ev_parser_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,7 @@ end
 
 if Redcar::App.ARGV.include? &quot;--test-perf-load&quot;
   RubyProf.start
-  Coms::OpenTab.new(&quot;/home/dan/projects/redcar/plugins2/core/window.rb&quot;).do
+  Coms::OpenTab.new(&quot;/home/dan/projects/rak/bin/rak&quot;).do
   result = RubyProf.stop
   printer = RubyProf::GraphHtmlPrinter.new(result)
   printer.print(STDOUT, :min_percent =&gt; 1)</diff>
      <filename>plugins2/scripting/startup.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f7b9102b794a84f272ff0320146dfd409dfaa006</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Lucraft</name>
    <email>dan@fluentradical.com</email>
  </author>
  <url>http://github.com/danlucraft/redcar/commit/2c644921d4df64459c942fc21945514aba341135</url>
  <id>2c644921d4df64459c942fc21945514aba341135</id>
  <committed-date>2008-03-31T13:35:21-07:00</committed-date>
  <authored-date>2008-03-31T13:35:21-07:00</authored-date>
  <message>broken ...</message>
  <tree>73c713b0f14bb8fbe02dcedfe45756014930b9e6</tree>
  <committer>
    <name>Daniel Lucraft</name>
    <email>dan@fluentradical.com</email>
  </committer>
</commit>
