1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

script: adjust scroll after command /script go N

This commit is contained in:
Sébastien Helleu
2023-08-22 09:21:00 +02:00
parent ad75786e15
commit 87e47894e6
2 changed files with 16 additions and 14 deletions
+1
View File
@@ -22,6 +22,7 @@ Bug fixes::
* irc: fix wrong time displayed for CTCP messages received from self nick (issue #2000)
* logger: remove trailing empty line in display of backlog (issue #2002)
* perl: fix display of non-ASCII chars after load of a script with Perl >= 5.38 (issue #1996)
* script: adjust scroll after command `/script go N`
* scripts: fix function string_parse_size on 32-bit systems (python and ruby) (issue #1999)
* xfer: fix conversion of string to IPv4 on 32-bit systems (issue #1999)
+15 -14
View File
@@ -144,20 +144,6 @@ script_command_script (const void *pointer, void *data,
return WEECHAT_RC_OK;
}
if (weechat_strcmp (argv[1], "go") == 0)
{
if ((argc > 2) && script_buffer && !script_buffer_detail_script)
{
error = NULL;
value = strtol (argv[2], &error, 10);
if (error && !error[0])
{
script_buffer_set_current_line (value);
}
}
return WEECHAT_RC_OK;
}
if (weechat_strcmp (argv[1], "search") == 0)
{
if (scripts_repo)
@@ -216,6 +202,21 @@ script_command_script (const void *pointer, void *data,
return WEECHAT_RC_OK;
}
if (weechat_strcmp (argv[1], "go") == 0)
{
if ((argc > 2) && script_buffer && !script_buffer_detail_script)
{
error = NULL;
value = strtol (argv[2], &error, 10);
if (error && !error[0])
{
script_buffer_set_current_line (value);
script_buffer_check_line_outside_window ();
}
}
return WEECHAT_RC_OK;
}
if (weechat_strcmp (argv[1], "up") == 0)
{
if (script_buffer)