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@
This commit is contained in:
okan
2010-02-10 01:23:05 +00:00
parent c4a97053cd
commit 507480a695
3 changed files with 8 additions and 5 deletions

2
menu.c
View File

@ -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;