about summary refs log tree commit diff stats
path: root/main.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 /main.lua
parent2b1889353bcf70951ca180f9032ef7e6f35a67ab (diff)
downloadlines.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 'main.lua')
-rw-r--r--main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index 56deff6..cd515ec 100644
--- a/main.lua
+++ b/main.lua
@@ -113,9 +113,9 @@ end
 function App.resize(w, h)
 --?   print(("Window resized to width: %d and height: %d."):format(w, h))
   App.screen.width, App.screen.height = w, h
-  Text.redraw_all()
+  Text.redraw_all(Editor_state)
   Editor_state.selection1 = {}  -- no support for shift drag while we're resizing
-  Text.tweak_screen_top_and_cursor(Editor_state.margin_left, App.screen.height-Editor_state.margin_right)
+  Text.tweak_screen_top_and_cursor(Editor_state, Editor_state.margin_left, App.screen.height-Editor_state.margin_right)
   Last_resize_time = App.getTime()
 end