about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-21 21:08:21 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-21 21:08:21 -0700
commit96dfe4f669eca35c77f4f2b4458bac8038a0bd84 (patch)
treebc659cf3c15a472b4aad0245227e14a528c61fbd
parent1e63bf0e0a58860bbdf9fce02f551c2d00fa2c0f (diff)
downloadtext.love-96dfe4f669eca35c77f4f2b4458bac8038a0bd84.tar.gz
cleaner
-rw-r--r--text.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/text.lua b/text.lua
index e45d174..852ff94 100644
--- a/text.lua
+++ b/text.lua
@@ -335,9 +335,8 @@ function Text.cursor_at_final_screen_line()
   if Lines[Cursor1.line].screen_line_starting_pos == nil then
     return true
   end
-  i=#Lines[Cursor1.line].screen_line_starting_pos
-  local spos = Lines[Cursor1.line].screen_line_starting_pos[i]
-  return spos <= Cursor1.pos
+  screen_lines = Lines[Cursor1.line].screen_line_starting_pos
+  return screen_lines[#screen_lines] <= Cursor1.pos
 end
 
 function Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary()