}
char *
-ui_readline(char *prompt, char *s, size_t limit, bool use_completion)
+ui_readline(const char *prompt, char *s, size_t limit, bool use_completion)
{
int y, x;
char *ret;
}
int
-statusline_ask_boolean(char *msg, int def)
+statusline_ask_boolean(const char *msg, int def)
{
int ret;
char *msg2 = strconcat(msg, def ? _(" (Y/n)?") : _(" (y/N)?"), NULL);
}
char *
-ask_filename(char *prompt)
+ask_filename(const char *prompt)
{
char *buf = NULL;
} 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,