diff --git a/src/prompt.c b/src/prompt.c index 0b73c40b..025fd203 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -615,7 +615,8 @@ int do_prompt(bool allow_tabs, bool allow_files, bottombars(menu); - answer = mallocstrcpy(answer, curranswer); + if (answer != curranswer) + answer = mallocstrcpy(answer, curranswer); #ifndef NANO_TINY redo_theprompt: