src/Pure/PIDE/protocol.scala
changeset 55548 a645277885cf
parent 55433 d2960d67f163
child 55646 ec4651c697e3
equal deleted inserted replaced
55547:384bfd19ee61 55548:a645277885cf
   280     chunk: Command.Chunk,
   280     chunk: Command.Chunk,
   281     message: XML.Elem): Set[Text.Range] =
   281     message: XML.Elem): Set[Text.Range] =
   282   {
   282   {
   283     def elem_positions(props: Properties.T, set: Set[Text.Range]): Set[Text.Range] =
   283     def elem_positions(props: Properties.T, set: Set[Text.Range]): Set[Text.Range] =
   284       props match {
   284       props match {
   285         case Position.Reported(id, file_name, range)
   285         case Position.Reported(id, file_name, raw_range)
   286         if (id == command_id || id == alt_id) && file_name == chunk.file_name =>
   286         if (id == command_id || id == alt_id) && file_name == chunk.file_name =>
   287           val range1 = chunk.decode(range).restrict(chunk.range)
   287           chunk.decode(raw_range).try_restrict(chunk.range) match {
   288           if (range1.is_singularity) set else set + range1
   288             case Some(range) if !range.is_singularity => set + range
       
   289             case _ => set
       
   290           }
   289         case _ => set
   291         case _ => set
   290       }
   292       }
   291 
   293 
   292     def positions(set: Set[Text.Range], tree: XML.Tree): Set[Text.Range] =
   294     def positions(set: Set[Text.Range], tree: XML.Tree): Set[Text.Range] =
   293       tree match {
   295       tree match {