]> matita.cs.unibo.it Git - helm.git/commitdiff
notify was not called when Margin was raised. Fixed.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 7 Jul 2005 09:31:36 +0000 (09:31 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 7 Jul 2005 09:31:36 +0000 (09:31 +0000)
helm/matita/matitaScript.ml

index e76f011ff23ee0b088ba150f317282fd724798c1..5fbcc4092eeddfda379ddc682765bfb292cfaa67 100644 (file)
@@ -396,13 +396,13 @@ List.iter (fun s -> prerr_endline ("'" ^ s ^ "'")) new_statements;
     try
       self#_advance ?statement ();
       self#notify
-    with Margin -> ()
+    with Margin -> self#notify
 
   method retract () =
     try
       self#_retract ();
       self#notify
-    with Margin -> ()
+    with Margin -> self#notify
 
   method private getFuture =
     buffer#get_text ~start:(buffer#get_iter_at_mark (`MARK locked_mark))
@@ -436,6 +436,7 @@ List.iter (fun s -> prerr_endline ("'" ^ s ^ "'")) new_statements;
     observers <- o :: observers
 
   method private notify =
+prerr_endline ("************* NOTIFICATO");
     let status = self#status in
     List.iter (fun o -> o status) observers
 
@@ -499,7 +500,7 @@ List.iter (fun s -> prerr_endline ("'" ^ s ^ "'")) new_statements;
           in
           dowhile (getpos ());
           self#notify 
-        with Margin -> ())
+        with Margin -> self#notify)
     | `Cursor ->
         let locked_iter () = buffer#get_iter_at_mark (`NAME "locked") in
         let cursor_iter () = buffer#get_iter_at_mark `INSERT in
@@ -521,7 +522,7 @@ List.iter (fun s -> prerr_endline ("'" ^ s ^ "'")) new_statements;
             (back_until_cursor (); self#notify)
           else                  (* cursor = locked *)
               ()
-        with Margin -> ())
+        with Margin -> self#notify)
 
   method onGoingProof () =
     match self#status.proof_status with