about summary refs log tree commit diff stats
path: root/select.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-12 17:24:01 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-12 17:24:01 -0700
commitf7d4deef0ce51ad0527eb0b8b1a244adf3fb50f6 (patch)
treecfbd9cfccedb5fae13dbd3b5364032e7cab05b7b /select.lua
parent2b1889353bcf70951ca180f9032ef7e6f35a67ab (diff)
downloadview.love-f7d4deef0ce51ad0527eb0b8b1a244adf3fb50f6.tar.gz
add state arg to a few functions
  - Text.cursor_at_final_screen_line
  - Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary
  - Text.snap_cursor_to_bottom_of_screen
  - Text.in_line
  - Text.to_pos_on_line
  - Text.to2
  - Text.to1
  - Text.previous_screen_line
  - Text.tweak_screen_top_and_cursor
  - Text.redraw_all
Diffstat (limited to 'select.lua')
-rw-r--r--select.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/select.lua b/select.lua
index 8c015f6..a6c271b 100644
--- a/select.lua
+++ b/select.lua
@@ -93,8 +93,8 @@ end
 function Text.to_pos(State, x,y, left, right)
   for line_index,line in ipairs(State.lines) do
     if line.mode == 'text' then
-      if Text.in_line(line, x,y, left, right) then
-        return line_index, Text.to_pos_on_line(line, x,y, left, right)
+      if Text.in_line(State, line, x,y, left, right) then
+        return line_index, Text.to_pos_on_line(State, line, x,y, left, right)
       end
     end
   end