X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fpopup_msg.c;h=5c0e5bad09898bfcea4c76b641dc74ff86d8eb64;hp=5a351731a25e14f8d6adbedc99e22a0e4c34e5d6;hb=9b4c4abadc0a29999c5ddad5aa8d769fee28d687;hpb=5d8dbcdd9423bf9821db414fd9ec792ccf1f1027 diff --git a/test/popup_msg.c b/test/popup_msg.c index 5a351731..5c0e5bad 100644 --- a/test/popup_msg.c +++ b/test/popup_msg.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2017 Free Software Foundation, Inc. * + * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: popup_msg.c,v 1.8 2017/09/03 21:05:01 tom Exp $ + * $Id: popup_msg.c,v 1.10 2020/02/02 23:34:34 tom Exp $ * * Show a multi-line message in a window which may extend beyond the screen. * @@ -86,8 +87,10 @@ popup_msg(WINDOW *parent, const char *const *msg) if ((help = newwin(high, wide, y0, x0)) == 0) return; - if ((data = newpad(length + 1, width)) == 0) + if ((data = newpad(length + 1, width)) == 0) { + delwin(help); return; + } begin_popup();