summaryrefslogtreecommitdiff
path: root/src/plugins/script
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-08-22 09:21:00 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-08-22 09:21:00 +0200
commit6950c953a1d2c88cfda4ea9966634faf6b7c99c4 (patch)
treec15257692e433b02209f9276877a06caa7134214 /src/plugins/script
parentfd6bdd3b59f73cea2d7c1f81b71dae212dad870d (diff)
downloadweechat-6950c953a1d2c88cfda4ea9966634faf6b7c99c4.zip
script: adjust scroll after command `/script go N`
Diffstat (limited to 'src/plugins/script')
-rw-r--r--src/plugins/script/script-command.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c
index 1cc028f27..ef9804afb 100644
--- a/src/plugins/script/script-command.c
+++ b/src/plugins/script/script-command.c
@@ -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)