/*
- * $Id: ui.c,v 1.57 2006/04/10 08:15:46 jheinonen Exp $
+ * $Id: ui.c,v 1.58 2006/09/06 02:24:33 cduval Exp $
*
* by JH <jheinonen@users.sourceforge.net>
*
} else {
char *s;
s = ui_readline("/", findstr, MAX_FIELD_LEN - 1, 0);
- strncpy(findstr, s, MAX_FIELD_LEN);
- free(s);
refresh_screen();
+ if(s == NULL) {
+ return; /* user cancelled (ctrl-G) */
+ } else {
+ strncpy(findstr, s, MAX_FIELD_LEN);
+ free(s);
+ }
}
if( (item = find_item(findstr, list_get_curitem() + !!next,