Commit b49daec3 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

in do_insertfile(), if file browsing succeeds, copy the filename we

browsed to into ans, put back Enter, and show the prompt one last time
so that it's exited properly and the cursor position at the statusbar is
reset


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1967 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 11 additions and 4 deletions
+11 -4
...@@ -76,6 +76,10 @@ CVS code - ...@@ -76,6 +76,10 @@ CVS code -
- Simplify by reusing variables whereever possible, and add a - Simplify by reusing variables whereever possible, and add a
parameter execute to indicate whether or not to be in "Execute parameter execute to indicate whether or not to be in "Execute
Command" mode. (DLR) Command" mode. (DLR)
- If file browsing succeeds, copy the filename we browsed to
into ans, put back Enter, and show the prompt one last time so
that it's exited properly and the cursor position at the
statusbar is reset. (DLR)
open_prevfile(), open_nextfile() open_prevfile(), open_nextfile()
- Translate the "New Buffer" string when displaying "Switched - Translate the "New Buffer" string when displaying "Switched
to" messages on the statusbar. (DLR) to" messages on the statusbar. (DLR)
......
...@@ -558,10 +558,13 @@ void do_insertfile( ...@@ -558,10 +558,13 @@ void do_insertfile(
if (i == NANO_TOFILES_KEY) { if (i == NANO_TOFILES_KEY) {
char *tmp = do_browse_from(answer); char *tmp = do_browse_from(answer);
if (tmp == NULL) if (tmp != NULL) {
goto start_again; free(answer);
free(answer); answer = tmp;
answer = tmp; ans = mallocstrcpy(ans, answer);
unget_kbinput(NANO_ENTER_KEY, FALSE);
}
goto start_again;
} }
#endif #endif
......
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