about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-08-18 00:19:07 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-08-18 00:19:07 -0700
commitf79dd4824c72ab93e90bdbf1d3fa130f7fb3c97d (patch)
treea55d0820608fba88f490096b557b36b2474cec4a
parent2381f7b43f5fb9474dea984ae0b02f56ca2030cf (diff)
downloadview.love-f79dd4824c72ab93e90bdbf1d3fa130f7fb3c97d.tar.gz
simplify
-rw-r--r--text.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/text.lua b/text.lua
index c38dc1e..4a585b7 100644
--- a/text.lua
+++ b/text.lua
@@ -498,10 +498,7 @@ function Text.down(State)
     end
   else
     -- move down one screen line in current line
-    local scroll_down = false
-    if Text.le1(State.screen_bottom1, State.cursor1) then
-      scroll_down = true
-    end
+    local scroll_down = Text.le1(State.screen_bottom1, State.cursor1)
 --?     print('cursor is NOT at final screen line of its line')
     local screen_line_starting_pos, screen_line_index = Text.pos_at_start_of_cursor_screen_line(State)
     new_screen_line_starting_pos = State.line_cache[State.cursor1.line].screen_line_starting_pos[screen_line_index+1]