Commit 56a8aad8 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

properly handle the case where the user resized the window while at the

statusbar prompt, in which case prompt won't be NULL when statusq() is
called


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3070 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent bdc038db
Showing with 4 additions and 1 deletion
+4 -1
......@@ -826,7 +826,10 @@ int statusq(bool allow_tabs, const shortcut *s, const char *curranswer,
bool list = FALSE;
#endif
assert(prompt == NULL);
/* prompt has been freed and set to NULL unless the user resized
* while at the statusbar prompt. */
if (prompt != NULL)
free(prompt);
prompt = charalloc(((COLS - 4) * mb_cur_max()) + 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment