clarified select_entity (again): it is meant as approximation to "refactoring" and thus only makes sense for defs within the same buffer;
authorwenzelm
Wed, 16 Dec 2020 13:17:48 +0100
changeset 73168 25cc8f5184e5
parent 73167 69f768aff611
child 73169 776198313227
clarified select_entity (again): it is meant as approximation to "refactoring" and thus only makes sense for defs within the same buffer;
src/Tools/jEdit/src/isabelle.scala
--- a/src/Tools/jEdit/src/isabelle.scala	Mon Dec 14 22:01:54 2020 +0100
+++ b/src/Tools/jEdit/src/isabelle.scala	Wed Dec 16 13:17:48 2020 +0100
@@ -359,7 +359,8 @@
     for (doc_view <- Document_View.get(text_area)) {
       val rendering = doc_view.get_rendering()
       val caret_range = JEdit_Lib.caret_range(text_area)
-      val active_focus = rendering.caret_focus_ranges(caret_range, Text.Range.full)
+      val buffer_range = JEdit_Lib.buffer_range(text_area.getBuffer)
+      val active_focus = rendering.caret_focus_ranges(caret_range, buffer_range)
       if (active_focus.nonEmpty) {
         text_area.selectNone()
         for (r <- active_focus)