diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-03-02 18:50:29 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-03-02 18:50:29 -0500 |
commit | e321dfc3c96f50f09c3953340a5a6fea72a5a245 (patch) | |
tree | dc13fee011e7c49536eb28b5b3d5de8bef93af89 /src/run.rs | |
parent | 8bc73974e78883eb1f619d1829a8be77933e5c00 (diff) |
add tab widget for showing which tab we are on
- code cleanup
- pageup and pagedown now work properly
Diffstat (limited to 'src/run.rs')
-rw-r--r-- | src/run.rs | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -2,7 +2,7 @@ use std::thread; use crate::commands::{CommandKeybind, CursorMoveUp, JoshutoRunnable}; use crate::config::{JoshutoCommandMapping, JoshutoConfig}; -use crate::context::{JoshutoContext, MESSAGE_VISIBLE_DURATION}; +use crate::context::JoshutoContext; use crate::tab::JoshutoTab; use crate::ui; use crate::ui::widgets::{TuiCommandMenu, TuiView}; @@ -85,11 +85,9 @@ pub fn run(config_t: JoshutoConfig, keymap_t: JoshutoCommandMapping) -> std::io: } } Some(CommandKeybind::CompositeKeybind(m)) => { - let mut map: &JoshutoCommandMapping = &m; - let cmd = { let mut menu = TuiCommandMenu::new(); - menu.get_input(&mut backend, &context, map) + menu.get_input(&mut backend, &context, &m) }; if let Some(command) = cmd { |