diff options
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c index 0d963e0..8ec97fb 100644 --- a/src/interface.c +++ b/src/interface.c @@ -3883,7 +3883,7 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show currentcommand->prev_command = last_command; currentcommand->command = mystrdup(ed.str); last_command = currentcommand; - return ed.str; + return currentcommand->command; } if (sdl_key==SDLK_ESCAPE || sdl_key==SDLK_BACKQUOTE) { @@ -3910,6 +3910,7 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show currentcommand = currentcommand->prev_command; } strcpy(ed.str, currentcommand->command); + ed.cursor = strlen(ed.str); } else { |
