about summary refs log tree commit diff stats
path: root/select.lua
diff options
context:
space:
mode:
Diffstat (limited to 'select.lua')
-rw-r--r--select.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/select.lua b/select.lua
index 5659015..219fe3e 100644
--- a/select.lua
+++ b/select.lua
@@ -135,8 +135,7 @@ function Text.delete_selection_without_undo()
   Cursor1.pos = minp
   Selection1 = {}
   -- delete everything between min (inclusive) and max (exclusive)
-  Lines[minl].fragments = nil
-  Lines[minl].screen_line_starting_pos = nil
+  Text.clear_cache(Lines[minl])
   local min_offset = Text.offset(Lines[minl].data, minp)
   local max_offset = Text.offset(Lines[maxl].data, maxp)
   if minl == maxl then