diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-18 09:43:50 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-18 09:43:50 -0400 |
commit | 7ca4a71f510fc375dd1ba7587db52fd2a6683c32 (patch) | |
tree | 219f3876fb33a1669e0827d717f107f6e882c115 /src/commands/cursor_move.rs | |
parent | 67cbc92b720b12cdaad780bb95a40710f980dfe4 (diff) |
cursor_move now always repaint
- even when a repaint is not needed (e.g. cursor is at beginning/end of directory listing)
Diffstat (limited to 'src/commands/cursor_move.rs')
-rw-r--r-- | src/commands/cursor_move.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/commands/cursor_move.rs b/src/commands/cursor_move.rs index f9be9fb..5899a9b 100644 --- a/src/commands/cursor_move.rs +++ b/src/commands/cursor_move.rs @@ -15,16 +15,19 @@ impl CursorMove { None => {} Some(index) => { let dir_len = curr_list.contents.len(); +/* + if index == dir_len - 1 { + return; + } +*/ if new_index >= dir_len { new_index = dir_len - 1; - if index == dir_len - 1 { - return; - } } curr_list.index = Some(new_index); } } } + curr_tab.refresh_curr(&view.mid_win, context.config_t.scroll_offset); curr_tab.refresh_file_status(&view.bot_win); curr_tab.refresh_path_status( |