CVS code -
+- General:
+ - Make sure that the statusbar cursor position is always
+ properly reset when we get out of all statusbar prompts.
+ Changes to do_insertfile(), do_writeout(),
+ handle_sigwinch(), main(), and do_prompt_abort(). (DLR)
GNU nano 1.9.99pre1 - 2006.08.29
- General:
if (tmp == NULL)
continue;
+ /* We have a file now. Indicate this. */
free(answer);
answer = tmp;
- /* We have a file now. Indicate this and get out of the
- * statusbar prompt cleanly. */
i = 0;
- do_prompt_abort();
}
#endif
if (tmp == NULL)
continue;
+ /* We have a file now. Indicate this. */
free(answer);
answer = tmp;
-
- /* We have a file now. Get out of the statusbar prompt
- * cleanly. */
- do_prompt_abort();
} else
#endif /* !DISABLE_BROWSER */
#ifndef NANO_TINY
COLS = win.ws_col;
LINES = win.ws_row;
- /* Just in case we're in the statusbar prompt, reset the statusbar
- * cursor position. */
- do_prompt_abort();
-
/* If we've partitioned the filestruct, unpartition it now. */
if (filepart != NULL)
unpartition_filestruct(&filepart);
/* Read in and interpret characters. */
do_input(&meta_key, &func_key, &s_or_t, &ran_func, &finished,
TRUE);
+
+ /* Just in case we were in the statusbar prompt, reset the
+ * statusbar cursor position. */
+ do_prompt_abort();
}
/* We should never get here. */
}
/* This function forces a reset of the statusbar cursor position. It
- * should only be called after do_prompt(), and is only needed if we
- * leave the prompt via something other than Cancel or Enter. */
+ * should be called when we get out of all statusbar prompts. */
void do_prompt_abort(void)
{
+ /* Uninitialize the old cursor position in answer. */
+ old_statusbar_x = (size_t)-1;
+ old_pww = (size_t)-1;
+
reset_statusbar_x = TRUE;
}