Make "You can't hide an invisible window" message respect /SET WINDOW_QUIET

Also remove unnecessary NULL check, window->screen is already checked for NULL.
This commit is contained in:
Kevin Easton
2017-11-10 17:16:58 +11:00
parent c6f420b53d
commit a71ee883e1
2 changed files with 8 additions and 6 deletions

View File

@@ -1078,7 +1078,8 @@ void BX_hide_window(Window *window)
{
if (!window->screen)
{
say("You can't hide an invisible window.");
if (!get_int_var(WINDOW_QUIET_VAR))
say("You can't hide an invisible window.");
return;
}
if (window->screen->visible_windows == 1)
@@ -1087,11 +1088,9 @@ void BX_hide_window(Window *window)
say("You can't hide the last window.");
return;
}
if (window->screen)
{
remove_window_from_screen(window);
add_to_invisible_list(window);
}
remove_window_from_screen(window);
add_to_invisible_list(window);
}
/*