File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -514,14 +514,14 @@ impl Tui {
514
514
// Scroll:
515
515
// Focused line is line that should always be at the center of the screen.
516
516
let display_start;
517
- let scroll_offset = 4 ;
518
- let extra_top_lines = 10 ;
517
+
519
518
let height = area. height as i32 ;
519
+ let extra_top_lines = height / 2 ;
520
520
let prev_start = draw_memory. current_startline ;
521
521
// Absolute minimum start line
522
522
let abs_min_start = 0 ;
523
523
// Adjust for weird scrolling for max top line
524
- let abs_max_start = ( opcode_list. len ( ) as i32 - 1 ) - height + scroll_offset ;
524
+ let abs_max_start = ( opcode_list. len ( ) as i32 - 1 ) - ( height / 2 ) ;
525
525
// actual minimum start line
526
526
let mut min_start =
527
527
max ( current_step as i32 - height + extra_top_lines, abs_min_start) as usize ;
You can’t perform that action at this time.
0 commit comments