summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorCracker64 <cracker642@gmail.com>2011-01-30 23:15:53 (GMT)
committer Cracker64 <cracker642@gmail.com>2011-01-30 23:15:53 (GMT)
commit6aaa9e78cd8ce2e11b6696f979a17d92e1c7fc40 (patch)
tree047a0b91f8b99ec4f15a7bfdd28d0874fb9c0416 /src/interface.c
parent8ed2947b4cbfbe21b9ba30961c469823f2e285ee (diff)
downloadpowder-6aaa9e78cd8ce2e11b6696f979a17d92e1c7fc40.zip
powder-6aaa9e78cd8ce2e11b6696f979a17d92e1c7fc40.tar.gz
possible fix from jacksonmj, cursor gets set to end while changing commands with up/down
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c3
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
{