Skip to content

Commit f803b70

Browse files
authored
fixes stack view (#625)
1 parent a1db9bc commit f803b70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,14 +514,14 @@ impl Tui {
514514
// Scroll:
515515
// Focused line is line that should always be at the center of the screen.
516516
let display_start;
517-
let scroll_offset = 4;
518-
let extra_top_lines = 10;
517+
519518
let height = area.height as i32;
519+
let extra_top_lines = height / 2;
520520
let prev_start = draw_memory.current_startline;
521521
// Absolute minimum start line
522522
let abs_min_start = 0;
523523
// 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);
525525
// actual minimum start line
526526
let mut min_start =
527527
max(current_step as i32 - height + extra_top_lines, abs_min_start) as usize;

0 commit comments

Comments
 (0)