diff options
author | qkzk <qu3nt1n@gmail.com> | 2024-10-28 22:36:41 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2024-10-28 22:36:41 +0100 |
commit | d6088e1884e40f7bd68d4c07991ec74671279b95 (patch) | |
tree | e22a4b1050d1bbbbd11725f9bf16a050629dc17e | |
parent | 2052abffd0fdd35692aeca9e87278e52182ac5cf (diff) |
FIX: diplay directory last line shouldn't be printed - erase the last line before printing log.
-rw-r--r-- | development.md | 1 | ||||
-rw-r--r-- | src/io/display.rs | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/development.md b/development.md index 819eff36..21e8c06e 100644 --- a/development.md +++ b/development.md @@ -1373,6 +1373,7 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - [x] FIX: trash: bottom line is wrong "Enter" doesn't select but restore - refresh & reselect - [x] FIX: input_simple: when height is low, static elements are out of the window - [x] FIX: crash when deleting a file in tree mode + - [x] FIX: diplay directory last line shouldn't be printed - erase the last line before printing log. - [x] doc - [ ] ??? diff --git a/src/io/display.rs b/src/io/display.rs index f54b9633..b4434c3d 100644 --- a/src/io/display.rs +++ b/src/io/display.rs @@ -997,10 +997,11 @@ struct LogLine; impl Draw for LogLine { fn draw(&self, f: &mut Frame, rect: &Rect) { - let height = rect.height; + let row = rect.height.saturating_sub(2); + rect.clear_line(f, row); rect.print_with_style( f, - height - 2, + row, 4, &read_last_log_line(), MENU_STYLES.get().expect("Menu colors should be set").second, |