mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-26 22:15:19 +03:00
fix(style): bury the dead (code)
This commit is contained in:
parent
6a90542ae3
commit
7de19dc6df
12
Cargo.lock
generated
12
Cargo.lock
generated
@ -2447,7 +2447,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zellij"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
dependencies = [
|
||||
"insta",
|
||||
"names",
|
||||
@ -2460,7 +2460,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zellij-client"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
dependencies = [
|
||||
"insta",
|
||||
"mio",
|
||||
@ -2470,7 +2470,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zellij-server"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
dependencies = [
|
||||
"ansi_term 0.12.1",
|
||||
"async-trait",
|
||||
@ -2487,7 +2487,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zellij-tile"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -2497,14 +2497,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zellij-tile-utils"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
dependencies = [
|
||||
"ansi_term 0.12.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zellij-utils"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"backtrace",
|
||||
|
@ -15,7 +15,7 @@ use crate::{
|
||||
wasm_vm::PluginInstruction,
|
||||
ServerInstruction, SessionState,
|
||||
};
|
||||
use zellij_tile::data::{Event, InputMode, ModeInfo, Palette, PluginCapabilities, TabInfo};
|
||||
use zellij_tile::data::{Event, ModeInfo, Palette, PluginCapabilities, TabInfo};
|
||||
use zellij_utils::{
|
||||
errors::{ContextType, ScreenContext},
|
||||
input::options::Options,
|
||||
@ -149,7 +149,6 @@ pub(crate) struct Screen {
|
||||
/// The index of this [`Screen`]'s active [`Tab`].
|
||||
active_tab_index: Option<usize>,
|
||||
mode_info: ModeInfo,
|
||||
input_mode: InputMode,
|
||||
colors: Palette,
|
||||
session_state: Arc<RwLock<SessionState>>,
|
||||
}
|
||||
@ -161,7 +160,6 @@ impl Screen {
|
||||
client_attributes: &ClientAttributes,
|
||||
max_panes: Option<usize>,
|
||||
mode_info: ModeInfo,
|
||||
input_mode: InputMode,
|
||||
session_state: Arc<RwLock<SessionState>>,
|
||||
) -> Self {
|
||||
Screen {
|
||||
@ -172,7 +170,6 @@ impl Screen {
|
||||
active_tab_index: None,
|
||||
tabs: BTreeMap::new(),
|
||||
mode_info,
|
||||
input_mode,
|
||||
session_state,
|
||||
}
|
||||
}
|
||||
@ -192,7 +189,6 @@ impl Screen {
|
||||
self.max_panes,
|
||||
Some(PaneId::Terminal(pane_id)),
|
||||
self.mode_info.clone(),
|
||||
self.input_mode,
|
||||
self.colors,
|
||||
self.session_state.clone(),
|
||||
);
|
||||
@ -354,7 +350,6 @@ impl Screen {
|
||||
self.max_panes,
|
||||
None,
|
||||
self.mode_info.clone(),
|
||||
self.input_mode,
|
||||
self.colors,
|
||||
self.session_state.clone(),
|
||||
);
|
||||
@ -428,7 +423,6 @@ pub(crate) fn screen_thread_main(
|
||||
session_state: Arc<RwLock<SessionState>>,
|
||||
) {
|
||||
let capabilities = config_options.simplified_ui;
|
||||
let default_mode = config_options.default_mode.unwrap_or_default();
|
||||
|
||||
let mut screen = Screen::new(
|
||||
bus,
|
||||
@ -439,10 +433,8 @@ pub(crate) fn screen_thread_main(
|
||||
capabilities: PluginCapabilities {
|
||||
arrow_fonts: capabilities,
|
||||
},
|
||||
mode: default_mode,
|
||||
..ModeInfo::default()
|
||||
},
|
||||
default_mode,
|
||||
session_state,
|
||||
);
|
||||
loop {
|
||||
|
@ -24,7 +24,7 @@ use std::{
|
||||
cmp::Reverse,
|
||||
collections::{BTreeMap, HashSet},
|
||||
};
|
||||
use zellij_tile::data::{Event, InputMode, ModeInfo, Palette};
|
||||
use zellij_tile::data::{Event, ModeInfo, Palette};
|
||||
use zellij_utils::{
|
||||
input::{
|
||||
layout::{Layout, Run},
|
||||
@ -87,7 +87,6 @@ pub(crate) struct Tab {
|
||||
should_clear_display_before_rendering: bool,
|
||||
session_state: Arc<RwLock<SessionState>>,
|
||||
pub mode_info: ModeInfo,
|
||||
pub input_mode: InputMode,
|
||||
pub colors: Palette,
|
||||
}
|
||||
|
||||
@ -99,7 +98,6 @@ pub(crate) struct TabData {
|
||||
pub name: String,
|
||||
pub active: bool,
|
||||
pub mode_info: ModeInfo,
|
||||
pub input_mode: InputMode,
|
||||
pub colors: Palette,
|
||||
}
|
||||
|
||||
@ -260,7 +258,6 @@ impl Tab {
|
||||
max_panes: Option<usize>,
|
||||
pane_id: Option<PaneId>,
|
||||
mode_info: ModeInfo,
|
||||
input_mode: InputMode,
|
||||
colors: Palette,
|
||||
session_state: Arc<RwLock<SessionState>>,
|
||||
) -> Self {
|
||||
@ -299,7 +296,6 @@ impl Tab {
|
||||
senders,
|
||||
should_clear_display_before_rendering: false,
|
||||
mode_info,
|
||||
input_mode,
|
||||
colors,
|
||||
session_state,
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
use super::{Screen, ScreenInstruction};
|
||||
use crate::zellij_tile::data::{InputMode, ModeInfo, Palette};
|
||||
use crate::zellij_tile::data::{ModeInfo, Palette};
|
||||
use crate::{
|
||||
os_input_output::{AsyncReader, Pid, ServerOsApi},
|
||||
thread_bus::Bus,
|
||||
@ -81,16 +81,8 @@ fn create_new_screen(position_and_size: PositionAndSize) -> Screen {
|
||||
client_attributes.position_and_size = position_and_size;
|
||||
let max_panes = None;
|
||||
let mode_info = ModeInfo::default();
|
||||
let input_mode = InputMode::Normal;
|
||||
let session_state = Arc::new(RwLock::new(SessionState::Attached));
|
||||
Screen::new(
|
||||
bus,
|
||||
&client_attributes,
|
||||
max_panes,
|
||||
mode_info,
|
||||
input_mode,
|
||||
session_state,
|
||||
)
|
||||
Screen::new(bus, &client_attributes, max_panes, mode_info, session_state)
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -1,5 +1,5 @@
|
||||
use super::Tab;
|
||||
use crate::zellij_tile::data::{InputMode, ModeInfo, Palette};
|
||||
use crate::zellij_tile::data::{ModeInfo, Palette};
|
||||
use crate::{
|
||||
os_input_output::{AsyncReader, Pid, ServerOsApi},
|
||||
panes::PaneId,
|
||||
@ -82,7 +82,6 @@ fn create_new_tab(position_and_size: PositionAndSize) -> Tab {
|
||||
let max_panes = None;
|
||||
let first_pane_id = Some(PaneId::Terminal(1));
|
||||
let mode_info = ModeInfo::default();
|
||||
let input_mode = InputMode::Normal;
|
||||
let colors = Palette::default();
|
||||
let session_state = Arc::new(RwLock::new(SessionState::Attached));
|
||||
Tab::new(
|
||||
@ -95,7 +94,6 @@ fn create_new_tab(position_and_size: PositionAndSize) -> Tab {
|
||||
max_panes,
|
||||
first_pane_id,
|
||||
mode_info,
|
||||
input_mode,
|
||||
colors,
|
||||
session_state,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user