diff options
author | qkzk <qu3nt1n@gmail.com> | 2023-11-06 13:40:22 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2023-11-06 13:40:22 +0100 |
commit | 2e953412b1c49db263c914214d1b73be39bb2851 (patch) | |
tree | 651f22e17947a66d95b5f543e883b74352d4deff /src/tree.rs | |
parent | 509e085a47942d9881fba54aa3c50635ba1c6c58 (diff) |
FIX: scrolling starts 1 row to low
Diffstat (limited to 'src/tree.rs')
-rw-r--r-- | src/tree.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tree.rs b/src/tree.rs index 07daa9f..76139fa 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -477,7 +477,7 @@ pub fn calculate_tree_window( let top: usize; let bottom: usize; let window_height = terminal_height - ContentWindow::WINDOW_MARGIN_TOP; - if selected_index < terminal_height - 1 { + if selected_index < terminal_height - ContentWindow::WINDOW_MARGIN_TOP { top = 0; bottom = window_height; } else { |