more accurate range wrt. command chunk;
authorwenzelm
Sun, 03 Aug 2025 16:58:04 +0200
changeset 82945 634b8a0f2966
parent 82944 37efc8611dca
child 82946 962b73cc57dc
more accurate range wrt. command chunk;
src/Pure/PIDE/editor.scala
--- a/src/Pure/PIDE/editor.scala	Sun Aug 03 14:42:19 2025 +0200
+++ b/src/Pure/PIDE/editor.scala	Sun Aug 03 16:58:04 2025 +0200
@@ -125,8 +125,9 @@
       def filter(msg: XML.Elem): Boolean =
         (for {
           command_range <- thy_command_range
-          msg_offset <- Position.Offset.unapply(msg.markup.properties)
-        } yield command_range.contains(msg_offset)) getOrElse true
+          msg_range <- Position.Range.unapply(msg.markup.properties)
+          chunk_range <- thy_command.get.chunk.incorporate(msg_range)
+        } yield command_range.contains(chunk_range)) getOrElse true
 
       thy_command orElse snapshot.current_command(snapshot.node_name, offset) match {
         case None => Editor.Output.init