From cafd7905db2acf9c81ecd4ac69f0c2794275beba Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Sat, 8 Dec 2018 13:03:56 +0000 Subject: Add "last" option to "type" command. --- telem.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/telem.lua b/telem.lua index 5b7ebbd..140c930 100755 --- a/telem.lua +++ b/telem.lua @@ -212,6 +212,11 @@ function do_type_first() do_type_show_post() end +function do_type_last() + current_thread_index = #current_thread_posts + do_type_show_post() +end + function do_type_next() if current_thread_index ~= #current_thread_posts then current_thread_index = current_thread_index + 1 @@ -243,6 +248,7 @@ end type_dispatch = {} type_dispatch["f"] = do_type_first +type_dispatch["l"] = do_type_last type_dispatch["n"] = do_type_next type_dispatch["p"] = do_type_prev type_dispatch["r"] = do_type_reply @@ -273,7 +279,7 @@ function do_type() end function show_type_prompt() - io.write("[f]irst, [n]ext, [p]rev, [r]eply, [d]one > ") + io.write("[f]irst, [n]ext, [p]rev, [l]last, [r]eply, [d]one > ") end function do_type_show_post() -- cgit v1.2.3