- let parsed_text_length = String.length parsed_text in
- let initial_space,parsed_text =
- try
- let pieces = Pcre.extract ~rex:heading_nl_RE' parsed_text in
- let p1 = pieces.(1) in
- let p1_len = String.length p1 in
- let rest = String.sub parsed_text p1_len (parsed_text_length - p1_len) in
- p1, rest
- with
- Not_found -> "", parsed_text in
- let inital_space,new_grafite_status,new_lexicon_status,new_status_and_text_list' =
- (* the code commented out adds the "select" command if needed *)
- initial_space,grafite_status,lexicon_status,[] in
-(* let loc, ex =
- match st with TA.Executable (loc,ex) -> loc, ex | _ -> assert false in
- match grafite_status.proof_status with
- | Incomplete_proof { stack = stack }
- when not (List.mem user_goal (Continuationals.head_goals stack)) ->
- let grafite_status =
- MatitaEngine.eval_ast
- ~do_heavy_checks:true grafite_status (goal_ast user_goal)
- in
- let initial_space = if initial_space = "" then "\n" else initial_space
- in
- "\n", grafite_status,
- [ grafite_status,
- initial_space ^ TAPp.pp_tactical (TA.Select (loc, [user_goal])) ]
- | _ -> initial_space,grafite_status,[] in *)
+ let module DTE = DisambiguateTypes.Environment in
+ let module DP = DisambiguatePp in
+ let parsed_text_length =
+ String.length skipped_txt + String.length nonskipped_txt
+ in
+ let text = skipped_txt ^ nonskipped_txt in
+ let prefix_len = MatitaGtkMisc.utf8_string_length skipped_txt in