aboutsummaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
authorokan2015-06-05 15:01:51 +0000
committerokan2015-06-05 15:01:51 +0000
commit2aded9f921d40f5977694087402570c7bea4ec57 (patch)
treefa4a1d4d00d4c5373ef2bd60e602ccfe60324ed8 /menu.c
parenta1cfe959b22953546e6de0ccb912120ce810160d (diff)
downloadcwm-2aded9f921d40f5977694087402570c7bea4ec57.tar.gz
add a flag to indicate a menu list instead of overloading 'prompt'
Diffstat (limited to '')
-rw-r--r--menu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index e5e992b..868dac5 100644
--- a/menu.c
+++ b/menu.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: menu.c,v 1.80 2015/06/05 14:54:04 okan Exp $
+ * $OpenBSD: menu.c,v 1.81 2015/06/05 15:01:51 okan Exp $
*/
#include <sys/types.h>
@@ -109,9 +109,11 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, const char *prompt,
mc.hasprompt = 1;
} else {
evmask = MENUMASK;
- mc.list = 1;
}
+ if (mc.flags & CWM_MENU_LIST)
+ mc.list = 1;
+
if (initial != NULL)
(void)strlcpy(mc.searchstr, initial, sizeof(mc.searchstr));
else