/WINDOW NAME now complains if you try to change the window's name to

something that's already in use.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2140 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-25 15:16:28 +00:00 committed by cras
commit 8fd09aa09f
3 changed files with 9 additions and 2 deletions

View file

@ -460,7 +460,12 @@ static void cmd_window_number(const char *data)
/* SYNTAX: WINDOW NAME <name> */
static void cmd_window_name(const char *data)
{
window_set_name(active_win, data);
if (window_find_name(data) == NULL)
window_set_name(active_win, data);
else {
printformat_window(active_win, MSGLEVEL_CLIENTERROR,
TXT_WINDOW_NAME_NOT_UNIQUE, data);
}
}
/* we're moving the first window to last - move the first contiguous block