about summary refs log tree commit diff stats
path: root/select.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-08-18 10:22:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-08-18 10:32:03 -0700
commit1d3c9f47085ee5d9cfa37d988d53f2dfead0195a (patch)
tree2b95e57cdd9ea18ec748fea7dc9458723fcec3b1 /select.lua
parentcf8d9774eac577b4cd4fdb77cbb27b6b46004756 (diff)
downloadlines.love-1d3c9f47085ee5d9cfa37d988d53f2dfead0195a.tar.gz
generalize a function
Diffstat (limited to 'select.lua')
-rw-r--r--select.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/select.lua b/select.lua
index c5794e1..bae9504 100644
--- a/select.lua
+++ b/select.lua
@@ -130,7 +130,7 @@ function Text.delete_selection_without_undo(State)
   State.cursor1.pos = minp
   if Text.lt1(State.cursor1, State.screen_top1) then
     State.screen_top1.line = State.cursor1.line
-    State.screen_top1.pos = Text.pos_at_start_of_cursor_screen_line(State)
+    State.screen_top1.pos = Text.pos_at_start_of_screen_line(State, State.cursor1)
   end
   State.selection1 = {}
   -- delete everything between min (inclusive) and max (exclusive)