sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit e95a132c6adc9dcf2220c2e09920b0830ba789b7
parent 8044d63cdefd47b1b900c0be54038ea1e06f9665
Author: Dan Callaghan <djc@djc.id.au>
Date:   Sun,  5 Apr 2026 14:55:04 +1000

load more threads on half-page-down

Similar to the page-down behaviour, if it is nearing the bottom it
should try to load more threads.

Diffstat:
M lib/sup/modes/line_cursor_mode.rb | 1 +
M test/unit/test_line_cursor_mode.rb | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/line_cursor_mode.rb b/lib/sup/modes/line_cursor_mode.rb
@@ -177,6 +177,7 @@ protected
   def half_page_down
     super
     set_cursor_pos [topline, @curpos].max
+    call_load_more_callbacks buffer.content_height if lines < topline + buffer.content_height
   end
 
   def jump_to_start
diff --git a/test/unit/test_line_cursor_mode.rb b/test/unit/test_line_cursor_mode.rb
@@ -147,6 +147,7 @@ class TestLineCursorMode < Minitest::Test
     mode.handle_input Ncurses::CharCode.character("\C-d")
     assert_equal 20, mode.curpos
     assert_equal 20, mode.topline
+    expect_load_more 40
 
     mode.handle_input Ncurses::CharCode.character("\C-d")
     assert_equal 40, mode.curpos