diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-04-24 19:17:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 19:17:58 -0400 |
commit | 863e780f2f8f09fb7244bcf9819694f50cc1a400 (patch) | |
tree | c2dab7bd22b577226f7a6cef0a030546a55d8593 /src/canvas/drawing_utils.rs | |
parent | 99fe0a1844b063ee34eafb7cab00bdadc3ae8006 (diff) |
change: add scrolling to help menu
Diffstat (limited to 'src/canvas/drawing_utils.rs')
-rw-r--r-- | src/canvas/drawing_utils.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/canvas/drawing_utils.rs b/src/canvas/drawing_utils.rs index 6c008724..2281e503 100644 --- a/src/canvas/drawing_utils.rs +++ b/src/canvas/drawing_utils.rs @@ -1,6 +1,7 @@ use crate::app; use itertools::izip; +// TODO: Reverse intrinsic? /// A somewhat jury-rigged solution to simulate a variable intrinsic layout for /// table widths. Note that this will do one main pass to try to properly /// allocate widths. This will thus potentially cut off latter elements @@ -77,9 +78,9 @@ pub fn get_variable_intrinsic_widths( pub fn get_search_start_position( num_columns: usize, cursor_direction: &app::CursorDirection, cursor_bar: &mut usize, - current_cursor_position: usize, is_resized: bool, + current_cursor_position: usize, is_force_redraw: bool, ) -> usize { - if is_resized { + if is_force_redraw { *cursor_bar = 0; } @@ -117,9 +118,9 @@ pub fn get_search_start_position( pub fn get_start_position( num_rows: u64, scroll_direction: &app::ScrollDirection, scroll_position_bar: &mut u64, - currently_selected_position: u64, is_resized: bool, + currently_selected_position: u64, is_force_redraw: bool, ) -> u64 { - if is_resized { + if is_force_redraw { *scroll_position_bar = 0; } |