about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index eacc8af..8b20ca4 100644
--- a/main.lua
+++ b/main.lua
@@ -420,6 +420,9 @@ function App.keychord_pressed(chord)
       local c = utf8.char(code)
       if c == '\n' then
         Text.insert_return()
+        if (Cursor_y + Line_height) > App.screen.height then
+          Text.snap_cursor_to_bottom_of_screen()
+        end
         num_newlines = num_newlines+1
       else
         Text.insert_at_cursor(c)