From: Enrico Tassi Date: Wed, 13 Jul 2005 15:31:43 +0000 (+0000) Subject: fixed lock mark X-Git-Tag: pre_notation~16 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=86f3b0d7706062defe2b0b361cb8344e025826c0;p=helm.git fixed lock mark --- diff --git a/helm/matita/matitaScript.ml b/helm/matita/matitaScript.ml index af38ff8c2..d145eec20 100644 --- a/helm/matita/matitaScript.ml +++ b/helm/matita/matitaScript.ml @@ -346,7 +346,6 @@ object (self) (** goal as seen by the user (i.e. metano corresponding to current tab) *) val mutable userGoal = ~-1 - val mutable lock_mark_pos = 0 (** text mark and tag representing locked part of a script *) val locked_mark = @@ -428,7 +427,6 @@ List.iter (fun s -> prerr_endline ("'" ^ s ^ "'")) new_statements; in buffer#move_mark mark ~where:new_mark_pos; buffer#apply_tag locked_tag ~start:buffer#start_iter ~stop:new_mark_pos; - lock_mark_pos <- new_mark_pos#offset; buffer#move_mark `INSERT old_insert; begin match self#status.proof_status with @@ -438,7 +436,7 @@ List.iter (fun s -> prerr_endline ("'" ^ s ^ "'")) new_statements; while Glib.Main.pending () do ignore(Glib.Main.iteration false); done method clean_dirty_lock = - let lock_mark_iter = buffer#get_iter (`OFFSET lock_mark_pos) in + let lock_mark_iter = buffer#get_iter_at_mark (`MARK locked_mark) in buffer#remove_tag locked_tag ~start:buffer#start_iter ~stop:buffer#end_iter; buffer#apply_tag locked_tag ~start:buffer#start_iter ~stop:lock_mark_iter