X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2FmatitaScript.ml;h=711ac975a8482b0b10993aaf87b141150148cdb3;hb=refs%2Fheads%2Fmaster;hp=c39e1de40a5ec9d9d7856718f196787ba9a4c1b3;hpb=3df31c02806eca83c63c14e6a89844f764c3e2cb;p=helm.git diff --git a/matita/matita/matitaScript.ml b/matita/matita/matitaScript.ml index c39e1de40..711ac975a 100644 --- a/matita/matita/matitaScript.ml +++ b/matita/matita/matitaScript.ml @@ -102,7 +102,7 @@ let eval_nmacro _include_paths (_buffer : GText.buffer) status _unparsed_text pa let name = Filename.dirname (script#filename) ^ "/" ^ name in let sequents = let selected = Continuationals.Stack.head_goals status#stack in - List.filter (fun x,_ -> List.mem x selected) menv + List.filter (fun (x,_) -> List.mem x selected) menv in CicMathView.screenshot status sequents menv subst name; [status, parsed_text], "", parsed_text_length @@ -773,7 +773,8 @@ object (self) | n (* when n < 0 *) -> current_mark_pos#backward_chars (abs n) in buffer#move_mark mark ~where:new_mark_pos; - buffer#apply_tag locked_tag ~start:buffer#start_iter ~stop:new_mark_pos; + (* CSC: the next line is required to avoid race conditions (deadlocks) *) + GtkThread.sync(fun () -> buffer#apply_tag locked_tag ~start:buffer#start_iter ~stop:new_mark_pos) (); buffer#move_mark `INSERT old_insert; let mark_position = buffer#get_iter_at_mark mark in if source_view#move_mark_onscreen mark then