- ignore (dialog#treeview#connect#cursor_changed (fun _ ->
- let tree_path =
- match fst (dialog#treeview#get_cursor ()) with
- None -> assert false
- | Some tp -> tp in
- let idx1,idx2,idx3 = model#get_interp_no tree_path in
- let loffset,lll = List.nth choices idx1 in
- let _,envs_and_diffs,msg =
- match idx2 with
- Some idx2 -> List.nth lll idx2
- | None -> [],[],lazy "Multiple error messages. Please select one." in
- let _,env,diff =
- match idx3 with
- Some idx3 -> List.nth envs_and_diffs idx3
- | None -> [],[],[] (* dymmy value, used *) in
- let script = MatitaScript.current () in
- let error_tag = script#error_tag in
- source_buffer#remove_tag error_tag
- ~start:source_buffer#start_iter
- ~stop:source_buffer#end_iter;
- notify_exn
- (GrafiteDisambiguator.DisambiguationError
- (offset,[[env,diff,loffset,msg]]))
- ));
+ ignore (dialog#treeview#connect#cursor_changed
+ (fun _ ->
+ let tree_path =
+ match fst (dialog#treeview#get_cursor ()) with
+ None -> assert false
+ | Some tp -> tp in
+ let idx1,idx2,idx3 = model#get_interp_no tree_path in
+ let loffset,lll = List.nth choices idx1 in
+ let _,envs_and_diffs,msg =
+ match idx2 with
+ Some idx2 -> List.nth lll idx2
+ | None -> [],[],lazy "Multiple error messages. Please select one." in
+ let _,env,diff =
+ match idx3 with
+ Some idx3 -> List.nth envs_and_diffs idx3
+ | None -> [],[],[] (* dymmy value, used *) in
+ let script = MatitaScript.current () in
+ let error_tag = script#error_tag in
+ source_buffer#remove_tag error_tag
+ ~start:source_buffer#start_iter
+ ~stop:source_buffer#end_iter;
+ notify_exn
+ (GrafiteDisambiguator.DisambiguationError
+ (offset,[[env,diff,loffset,msg]]))
+ ));