1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

fset: add keys alt-home and alt-end to go to first/last line

This commit is contained in:
Sébastien Helleu
2017-06-01 21:02:33 +02:00
parent b2373ffba7
commit c395bc4aba
2 changed files with 10 additions and 4 deletions
+7 -3
View File
@@ -167,7 +167,10 @@ fset_command_fset (const void *pointer, void *data,
{
if (argc < 3)
WEECHAT_COMMAND_ERROR;
value = fset_command_get_int_arg (argc, argv, 3, -1);
if (weechat_strcasecmp (argv[2], "end") == 0)
value = weechat_arraylist_size (fset_options) - 1;
else
value = fset_command_get_int_arg (argc, argv, 2, -1);
if (value < 0)
WEECHAT_COMMAND_ERROR;
fset_buffer_set_current_line (value);
@@ -498,7 +501,7 @@ fset_command_init ()
N_("-bar"
" || -refresh"
" || -up|-down [<number>]"
" || -go <line>"
" || -go <line>|end"
" || -toggle"
" || -add [<value>]"
" || -reset"
@@ -511,7 +514,8 @@ fset_command_init ()
"-refresh: force the refresh of the \"fset\" bar item\n"
" -up: move the selected line up by \"number\" lines\n"
" -down: move the selected line down by \"number\" lines\n"
" -go: select a line by number\n"
" -go: select a line by number, first line number is 0 "
"(\"end\" to select the last line)\n"
" -toggle: toggle the boolean value\n"
" -add: add \"value\", which can be a negative number "
"(only for integers and colors)\n"