From 9b8406f335cc4bfe86ce55a9fa39fb3094f6248e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 15 Nov 2002 09:03:35 +0000 Subject: [PATCH] /WINDOW NAME x, /WINDOW NAME X shouldn't complain about existing window having same name. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3001 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/window-commands.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/window-commands.c b/src/fe-common/core/window-commands.c index a8f3bb10..fbfacd85 100644 --- a/src/fe-common/core/window-commands.c +++ b/src/fe-common/core/window-commands.c @@ -531,7 +531,10 @@ static void cmd_window_number(const char *data) /* SYNTAX: WINDOW NAME */ static void cmd_window_name(const char *data) { - if (window_find_name(data) == NULL) + WINDOW_REC *win; + + win = window_find_name(data); + if (win == NULL || win == active_win) window_set_name(active_win, data); else if (active_win->name == NULL || strcmp(active_win->name, data) != 0) {