From: Nobuyoshi N. <nob...@so...> - 2002-09-04 12:14:25
|
なかだです。 insert modeで、挿入後のカーソルが行末に移動してしまいます。 $ echo -e 'aa\b\e[4hb\e[4lc' aba c ktermなどではこうなります。 $ echo -e 'aa\b\e[4hb\e[4lc' abc Index: mlterm/ml_edit.c =================================================================== RCS file: /cvsroot/mlterm/mlterm/mlterm/ml_edit.c,v retrieving revision 1.6 diff -u -2 -p -r1.6 ml_edit.c --- mlterm/ml_edit.c 2 Sep 2002 15:13:36 -0000 1.6 +++ mlterm/ml_edit.c 4 Sep 2002 12:13:18 -0000 @@ -178,4 +178,5 @@ insert_chars( u_int filled_len ; u_int filled_cols ; + u_int last_index ; int cols_rest ; int cols_after ; @@ -252,5 +253,7 @@ insert_chars( filled_cols += ml_char_cols( &ins_chars[count]) ; } - + + last_index = filled_len ; + if( filled_cols < edit->model.num_of_cols) { @@ -323,5 +326,5 @@ line_full: if( do_move_cursor) { - cursor_goto_by_char_index( edit , edit->cursor.char_index + filled_len , + cursor_goto_by_char_index( edit , edit->cursor.char_index + last_index , edit->cursor.row , BREAK_BOUNDARY) ; } -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦 |