mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
/UNQUERY and /WINDOW GOTO now ignores trailing whitespace
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2942 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
7d5ee9db1f
commit
7c11b314eb
2 changed files with 21 additions and 8 deletions
|
|
@ -280,6 +280,8 @@ static WINDOW_REC *window_highest_activity(WINDOW_REC *window)
|
|||
static void cmd_window_goto(const char *data)
|
||||
{
|
||||
WINDOW_REC *window;
|
||||
char *target;
|
||||
void *free_arg;
|
||||
|
||||
g_return_if_fail(data != NULL);
|
||||
|
||||
|
|
@ -288,13 +290,18 @@ static void cmd_window_goto(const char *data)
|
|||
return;
|
||||
}
|
||||
|
||||
if (g_strcasecmp(data, "active") == 0)
|
||||
if (!cmd_get_params(data, &free_arg, 1, &target))
|
||||
return;
|
||||
|
||||
if (g_strcasecmp(target, "active") == 0)
|
||||
window = window_highest_activity(active_win);
|
||||
else
|
||||
window = window_find_item(active_win->active_server, data);
|
||||
window = window_find_item(active_win->active_server, target);
|
||||
|
||||
if (window != NULL)
|
||||
window_set_active(window);
|
||||
|
||||
cmd_params_free(free_arg);
|
||||
}
|
||||
|
||||
/* SYNTAX: WINDOW NEXT */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue