aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/mod.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2021-02-09 17:36:37 +0100
committerGitHub <noreply@github.com>2021-02-09 17:36:37 +0100
commit14783c2b2c3bcd3b4b01e72c46d6af3ecbdd203c (patch)
tree7e25be8c93e85ec9fc03335f1993f319f713c614 /src/common/mod.rs
parentMerge pull request #158 from mosaic-org/add-files (diff)
downloadsl0ppij-14783c2b2c3bcd3b4b01e72c46d6af3ecbdd203c.tar.gz
sl0ppij-14783c2b2c3bcd3b4b01e72c46d6af3ecbdd203c.tar.xz
sl0ppij-14783c2b2c3bcd3b4b01e72c46d6af3ecbdd203c.zip
feat(ui): new keybindings and status bar (#160)
* work * feat(statusbar): new design and keybindings * fix(ipc): add missing const * style(fmt): rustfmt * style(input): remove accidental comment
Diffstat (limited to 'src/common/mod.rs')
-rw-r--r--src/common/mod.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/common/mod.rs b/src/common/mod.rs
index ab4b84e2..de0b9f76 100644
--- a/src/common/mod.rs
+++ b/src/common/mod.rs
@@ -17,7 +17,7 @@ use std::{collections::HashMap, fs};
use crate::panes::PaneId;
use directories_next::ProjectDirs;
-use input::handler::InputMode;
+use input::handler::InputState;
use serde::{Deserialize, Serialize};
use termion::input::TermRead;
use wasm_vm::PluginEnv;
@@ -43,18 +43,11 @@ pub enum ApiCommand {
MoveFocus,
}
// FIXME: It would be good to add some more things to this over time
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Default)]
pub struct AppState {
- pub input_mode: InputMode,
+ pub input_state: InputState,
}
-impl Default for AppState {
- fn default() -> Self {
- Self {
- input_mode: InputMode::Normal,
- }
- }
-}
// FIXME: Make this a method on the big `Communication` struct, so that app_tx can be extracted
// from self instead of being explicitly passed here
pub fn update_state(
@@ -362,6 +355,13 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs) {
.unwrap()
.set_pane_max_height(id, max_height);
}
+ ScreenInstruction::SetInvisibleBorders(id, invisible_borders) => {
+ screen
+ .get_active_tab_mut()
+ .unwrap()
+ .set_pane_invisible_borders(id, invisible_borders);
+ screen.render();
+ }
ScreenInstruction::ClosePane(id) => {
screen.get_active_tab_mut().unwrap().close_pane(id);
screen.render();