From 44f1d87ca93fe43f15f30b19704549c26b550c99 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 10 Feb 2010 01:23:05 +0000 Subject: preserve labels after an edit action is aborted; extending the menu struct just for this is the least intrusive approach until the menu code is reviewed. inspired by Thomas Pfaff's report on tech@ ok oga@ --- menu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'menu.c') diff --git a/menu.c b/menu.c index 96d6556..6b462be 100644 --- a/menu.c +++ b/menu.c @@ -223,6 +223,7 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq, mc->searchstr, sizeof(mi->text)); mi->dummy = 1; } + mi->abort = 0; return (mi); case CTL_WIPE: mc->searchstr[0] = '\0'; @@ -235,6 +236,7 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq, mi = xmalloc(sizeof *mi); mi->text[0] = '\0'; mi->dummy = 1; + mi->abort = 1; return (mi); default: break; -- cgit v1.2.3-2-gb3c3