From: Araki K. <j00...@ip...> - 2001-12-12 05:19:35
|
荒木です:-) Subject: [Mlterm-dev-ja] commit log From: Araki Ken <j00...@ip...> Message-ID: <200...@pd...> Date: 12 Dec 2001 04:27:30 +0900 > o 以下については、テストしていません。 > が、少なくとも 3,4 に関しては、kterm とほぼ同様の動きをするようです。 > 3. Test of character sets > 4. Test of double-sized characters > 5. Test of keyboard > 6. Test of terminal reports > 7. Test of VT52 mode > 8. Test of VT102 features (Insert/Delete Char/Line) > 9. Test of known bugs > 10. Test of reset and self-test > 11. Test non-VT100 (e.g., VT220, XTERM) terminals > 12. Modify test-parameters > > ちゃんと動作しているか、おためし下さい。 8. Test of VT102 features (Insert/Delete Char/Line) のバグフィクスです。src/ml_image_scroll.c に当てて下さい。 多分、これでいいと思うんですが、ESC [ r で、スクロール領域が設定されてい る場合の仕様がいまいちわからないので、間違っているかも知れません。 # 少なくともテストはパスします。 では -- kiken j00...@ip... Index: ml_image_scroll.c =================================================================== RCS file: /home/ken/cvsroot/mlterm/src/ml_image_scroll.c,v retrieving revision 1.41 diff -u -r1.41 ml_image_scroll.c --- ml_image_scroll.c 2001/12/11 18:11:32 1.41 +++ ml_image_scroll.c 2001/12/12 05:10:44 @@ -397,28 +397,38 @@ ) { u_int copy_rows ; + int start_row ; - if( image->cursor.row >= image->scroll_region_beg && image->scroll_region_end < END_ROW(image)) + if( image->cursor.row < image->scroll_region_beg) { - copy_rows = image->scroll_region_end + 1 - image->cursor.row ; + start_row = image->scroll_region_beg ; + } + else + { + start_row = image->cursor.row ; + } + + if( image->scroll_region_end < END_ROW(image)) + { + copy_rows = image->scroll_region_end + 1 - start_row ; - if( copy_rows + image->cursor.row + 1 > image->scroll_region_end + 1) + if( copy_rows + start_row > image->scroll_region_end) { copy_rows -- ; } - copy_lines( image , image->cursor.row + 1 , image->cursor.row , copy_rows , 1) ; + copy_lines( image , start_row + 1 , start_row , copy_rows , 1) ; } else { - copy_rows = image->num_of_filled_rows - image->cursor.row ; + copy_rows = image->num_of_filled_rows - start_row ; - if( copy_rows + image->cursor.row + 1 > image->num_of_rows) + if( copy_rows + start_row >= image->num_of_rows) { copy_rows -- ; } - copy_lines( image , image->cursor.row + 1 , image->cursor.row , copy_rows , 1) ; + copy_lines( image , image->cursor.row + 1 , start_row , copy_rows , 1) ; if( image->num_of_filled_rows < image->num_of_rows) { @@ -426,7 +436,7 @@ } } - ml_image_clear_lines( image , image->cursor.row , 1) ; + ml_image_clear_lines( image , start_row , 1) ; return 1 ; } @@ -436,22 +446,28 @@ ml_image_t * image ) { - if( image->cursor.row >= image->scroll_region_beg && image->scroll_region_end < END_ROW(image)) + int start_row ; + + if( image->cursor.row < image->scroll_region_beg) { - copy_lines( image , image->cursor.row , image->cursor.row + 1 , - image->scroll_region_end - image->cursor.row , 1) ; - - ml_image_clear_lines( image , image->scroll_region_end , 1) ; + start_row = image->scroll_region_beg ; } - else if( image->cursor.row < END_ROW(image)) + else { - copy_lines( image , image->cursor.row , image->cursor.row + 1 , - END_ROW(image) - image->cursor.row , 1) ; + start_row = image->cursor.row ; + } - ml_image_clear_lines( image , END_ROW(image) , 1) ; + if( image->scroll_region_end < END_ROW(image)) + { + copy_lines( image , start_row , start_row + 1 , + image->scroll_region_end - start_row , 1) ; + + ml_image_clear_lines( image , image->scroll_region_end , 1) ; } - else /* if( image->cursor.row == END_ROW(image)) */ + else { + copy_lines( image , start_row , start_row + 1 , END_ROW(image) - start_row , 1) ; + ml_image_clear_lines( image , END_ROW(image) , 1) ; } |