OSDN Git Service

android: Fix error in draw line in haltest tool
authorJerzy Kasenberg <jerzy.kasenberg@tieto.com>
Fri, 18 Oct 2013 13:15:59 +0000 (15:15 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 18 Oct 2013 13:43:21 +0000 (16:43 +0300)
This fixes small error that showed up when tab completion inserted
characters before end of line.
Cursor in line was not moved correctly.

android/client/terminal.c

index 0421633..8dd3a25 100644 (file)
@@ -140,7 +140,7 @@ void terminal_draw_command_line(void)
                putchar('>');
 
        /* move cursor to it's place */
-       terminal_move_cursor(line_len - line_buf_ix);
+       terminal_move_cursor(line_buf_ix - line_len);
 }
 
 /* inserts string into command line at cursor position */