Do not move cursor for SCROLL UP and SCROLL DOWN
This fixes #881, corrupted display of man pages with tables in tmux 2.4.
This commit is contained in:
@@ -119,11 +119,8 @@ void Framebuffer::scroll( int N )
|
|||||||
{
|
{
|
||||||
if ( N >= 0 ) {
|
if ( N >= 0 ) {
|
||||||
delete_line( ds.get_scrolling_region_top_row(), N );
|
delete_line( ds.get_scrolling_region_top_row(), N );
|
||||||
ds.move_row( -N, true );
|
|
||||||
} else {
|
} else {
|
||||||
N = -N;
|
insert_line( ds.get_scrolling_region_top_row(), -N );
|
||||||
insert_line( ds.get_scrolling_region_top_row(), N );
|
|
||||||
ds.move_row( N, true );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,9 +184,13 @@ void Framebuffer::move_rows_autoscroll( int rows )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( ds.get_cursor_row() + rows > ds.get_scrolling_region_bottom_row() ) {
|
if ( ds.get_cursor_row() + rows > ds.get_scrolling_region_bottom_row() ) {
|
||||||
scroll( ds.get_cursor_row() + rows - ds.get_scrolling_region_bottom_row() );
|
int N = ds.get_cursor_row() + rows - ds.get_scrolling_region_bottom_row();
|
||||||
|
scroll( N );
|
||||||
|
ds.move_row( -N, true );
|
||||||
} else if ( ds.get_cursor_row() + rows < ds.get_scrolling_region_top_row() ) {
|
} else if ( ds.get_cursor_row() + rows < ds.get_scrolling_region_top_row() ) {
|
||||||
scroll( ds.get_cursor_row() + rows - ds.get_scrolling_region_top_row() );
|
int N = ds.get_cursor_row() + rows - ds.get_scrolling_region_top_row();
|
||||||
|
scroll( N );
|
||||||
|
ds.move_row( -N, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
ds.move_row( rows, true );
|
ds.move_row( rows, true );
|
||||||
|
|||||||
Reference in New Issue
Block a user