summaryrefslogtreecommitdiff
path: root/src/fe-common/core/window-commands.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-11-15 09:03:35 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-11-15 09:03:35 +0000
commit9b8406f335cc4bfe86ce55a9fa39fb3094f6248e (patch)
treee4c6383669d26c55cd719c0bff89c2f6f853a044 /src/fe-common/core/window-commands.c
parentd6c1cfa14bdb5f18ef532c56e143c114f4be4a16 (diff)
downloadirssi-9b8406f335cc4bfe86ce55a9fa39fb3094f6248e.zip
/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
Diffstat (limited to 'src/fe-common/core/window-commands.c')
-rw-r--r--src/fe-common/core/window-commands.c5
1 files changed, 4 insertions, 1 deletions
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 <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) {