src/Pure/PIDE/command.ML
changeset 55429 4a50f9e70dc1
parent 54678 87910da843d5
child 55708 f4b114070675
     1.1 --- a/src/Pure/PIDE/command.ML	Tue Feb 11 12:08:44 2014 +0100
     1.2 +++ b/src/Pure/PIDE/command.ML	Tue Feb 11 15:05:13 2014 +0100
     1.3 @@ -102,8 +102,14 @@
     1.4            fun make_file src_path (Exn.Res (_, NONE)) =
     1.5                  Exn.interruptible_capture (fn () => read_file master_dir pos src_path) ()
     1.6              | make_file src_path (Exn.Res (file, SOME text)) =
     1.7 -                let val _ = Position.report pos (Markup.path file)
     1.8 -                in Exn.Res {src_path = src_path, text = text, pos = Position.file file} end
     1.9 +                let
    1.10 +                  val _ = Position.report pos (Markup.path file);
    1.11 +                  val file_pos =
    1.12 +                    Position.file file (*sic!*) |>
    1.13 +                    (case Position.get_id (Position.thread_data ()) of
    1.14 +                      NONE => I
    1.15 +                    | SOME exec_id => Position.put_id exec_id);
    1.16 +                in Exn.Res {src_path = src_path, text = text, pos = file_pos} end
    1.17              | make_file _ (Exn.Exn e) = Exn.Exn e;
    1.18  
    1.19            val src_paths = Keyword.command_files cmd path;