diff options
author | Solderpunk <solderpunk@sdf.org> | 2018-12-08 13:03:56 +0000 |
---|---|---|
committer | Solderpunk <solderpunk@sdf.org> | 2018-12-08 13:04:43 +0000 |
commit | cafd7905db2acf9c81ecd4ac69f0c2794275beba (patch) | |
tree | f3b8a09dfa1ac2ceb5ba9618dea0decec04d2a18 /telem.lua | |
parent | Reduce code duplication and needless function argument. (diff) |
Add "last" option to "type" command.
Diffstat (limited to '')
-rwxr-xr-x | telem.lua | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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() |