src/Tools/jEdit/src/plugin.scala
changeset 44954 b536b1144eb3
parent 44864 e50557cb0eb6
child 44955 9adaf5cd4f1c
     1.1 --- a/src/Tools/jEdit/src/plugin.scala	Sat Sep 17 17:55:39 2011 +0200
     1.2 +++ b/src/Tools/jEdit/src/plugin.scala	Sat Sep 17 19:25:14 2011 +0200
     1.3 @@ -373,7 +373,7 @@
     1.4        val thys =
     1.5          for (buffer <- buffers; model <- Isabelle.document_model(buffer))
     1.6            yield model.name
     1.7 -      val files = thy_info.dependencies(thys).toList.map(_._1.node).filterNot(loaded_buffer _)
     1.8 +      val files = thy_info.dependencies(thys).map(_._1.node).filterNot(loaded_buffer _)
     1.9  
    1.10        if (!files.isEmpty) {
    1.11          val files_list = new ListView(Library.sort_strings(files))
    1.12 @@ -388,8 +388,10 @@
    1.13              "Reload selected files now?",
    1.14              new ScrollPane(files_list))
    1.15          if (answer == 0)
    1.16 -          files_list.selection.items foreach (file =>
    1.17 -            if (!loaded_buffer(file)) jEdit.openFile(null: View, file))
    1.18 +          for {
    1.19 +            file <- files
    1.20 +            if !loaded_buffer(file) && files_list.selection.items.contains(file)
    1.21 +          } jEdit.openFile(null: View, file)
    1.22        }
    1.23      }
    1.24