mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 12:56:37 +02:00
script: allow jump to the last script with command /script go end
This commit is contained in:
@@ -29,6 +29,7 @@ New features::
|
||||
* irc: build dynamically the list of CTCPs supported in reply to "CTCP CLIENTINFO" (issue #1974)
|
||||
* irc: remove Git revision and compilation date from CTCP VERSION reply (issue #1974)
|
||||
* irc: remove default CTCP replies FINGER and USERINFO (issue #1974)
|
||||
* script: allow jump to the last script with command `/script go end`
|
||||
* script: allow commands `/script autoload`, `/script noautoload`, `/script toggleautoload` with scripts not present in the repository (issue #1980)
|
||||
* trigger: add options `-o`, `-ol`, `-i` and `-il` in command `/trigger list` (issue #1953)
|
||||
|
||||
|
||||
@@ -206,11 +206,21 @@ script_command_script (const void *pointer, void *data,
|
||||
{
|
||||
if ((argc > 2) && script_buffer && !script_buffer_detail_script)
|
||||
{
|
||||
error = NULL;
|
||||
value = strtol (argv[2], &error, 10);
|
||||
if (error && !error[0])
|
||||
line = -1;
|
||||
if (weechat_strcmp (argv[2], "end") == 0)
|
||||
{
|
||||
script_buffer_set_current_line (value);
|
||||
line = script_repo_count_displayed - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
error = NULL;
|
||||
value = strtol (argv[2], &error, 10);
|
||||
if (error && !error[0])
|
||||
line = value;
|
||||
}
|
||||
if (line >= 0)
|
||||
{
|
||||
script_buffer_set_current_line (line);
|
||||
script_buffer_check_line_outside_window ();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user