about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-05 07:59:44 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-05 07:59:44 -0700
commit8c0f54ee647bd454470d0f0149210e0124b7ffb2 (patch)
tree9ce00db32bce9c1f49f92c5d898ea2da84a76f21 /text.lua
parent6267ddd2eb2f3e1def0555e4968681a1c094f0a0 (diff)
downloadtext.love-8c0f54ee647bd454470d0f0149210e0124b7ffb2.tar.gz
some typos
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/text.lua b/text.lua
index 79d3675..e4bb325 100644
--- a/text.lua
+++ b/text.lua
@@ -491,9 +491,9 @@ function Text.down()
     end
   else
     -- move down one screen line in current line
-    local scroll_up = false
+    local scroll_down = false
     if Text.le1(Screen_bottom1, Cursor1) then
-      scroll_up = true
+      scroll_down = true
     end
 --?     print('cursor is NOT at final screen line of its line')
     local screen_line_index, screen_line_starting_pos = Text.pos_at_start_of_cursor_screen_line()
@@ -502,7 +502,7 @@ function Text.down()
     local s = string.sub(Lines[Cursor1.line].data, new_screen_line_starting_pos)
     Cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, Cursor_x) - 1
 --?     print('cursor pos is now', Cursor1.line, Cursor1.pos)
-    if scroll_up then
+    if scroll_down then
       Screen_top1.line = Cursor1.line
 --?       print('scroll up preserving cursor')
       Text.scroll_up_while_cursor_on_screen()