From 52aa9cf71bc5098a1c4ad7b9e3ba9fa87dfa70a3 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 2 Oct 2020 08:13:32 -0700 Subject: [PATCH] wezterm: move Pane into its own file --- .../gui/overlay/confirm_close_pane.rs | 3 +- src/frontend/gui/overlay/copy.rs | 2 +- src/frontend/gui/overlay/mod.rs | 3 +- src/frontend/gui/overlay/search.rs | 3 +- src/frontend/gui/termwindow.rs | 3 +- src/keyassignment.rs | 2 +- src/localtab.rs | 3 +- src/main.rs | 3 +- src/mux/domain.rs | 3 +- src/mux/mod.rs | 3 +- src/mux/pane.rs | 154 ++++++++++++++++++ src/mux/tab.rs | 154 +----------------- src/server/client.rs | 2 +- src/server/codec.rs | 7 +- src/server/domain.rs | 3 +- src/server/listener/sessionhandler.rs | 5 +- src/server/tab/clienttab.rs | 3 +- src/ssh.rs | 3 +- src/termwiztermtab.rs | 3 +- 19 files changed, 191 insertions(+), 171 deletions(-) create mode 100644 src/mux/pane.rs diff --git a/src/frontend/gui/overlay/confirm_close_pane.rs b/src/frontend/gui/overlay/confirm_close_pane.rs index 0eca12cd0..5765b590a 100644 --- a/src/frontend/gui/overlay/confirm_close_pane.rs +++ b/src/frontend/gui/overlay/confirm_close_pane.rs @@ -1,4 +1,5 @@ -use crate::mux::tab::{PaneId, TabId}; +use crate::mux::pane::PaneId; +use crate::mux::tab::TabId; use crate::mux::window::WindowId; use crate::mux::Mux; use crate::termwiztermtab::TermWizTerminal; diff --git a/src/frontend/gui/overlay/copy.rs b/src/frontend/gui/overlay/copy.rs index 06986cc15..7ba845ce8 100644 --- a/src/frontend/gui/overlay/copy.rs +++ b/src/frontend/gui/overlay/copy.rs @@ -1,8 +1,8 @@ use crate::frontend::gui::selection::{SelectionCoordinate, SelectionRange}; use crate::frontend::gui::termwindow::TermWindow; use crate::mux::domain::DomainId; +use crate::mux::pane::{Pane, PaneId}; use crate::mux::renderable::*; -use crate::mux::tab::{Pane, PaneId}; use portable_pty::PtySize; use rangeset::RangeSet; use std::cell::{RefCell, RefMut}; diff --git a/src/frontend/gui/overlay/mod.rs b/src/frontend/gui/overlay/mod.rs index 280db5a02..917be9ee8 100644 --- a/src/frontend/gui/overlay/mod.rs +++ b/src/frontend/gui/overlay/mod.rs @@ -1,5 +1,6 @@ use crate::frontend::gui::termwindow::TermWindow; -use crate::mux::tab::{Pane, PaneId, Tab, TabId}; +use crate::mux::pane::{Pane, PaneId}; +use crate::mux::tab::{Tab, TabId}; use crate::termwiztermtab::{allocate, TermWizTerminal}; use std::pin::Pin; use std::rc::Rc; diff --git a/src/frontend/gui/overlay/search.rs b/src/frontend/gui/overlay/search.rs index fb1a72156..ff4ec5831 100644 --- a/src/frontend/gui/overlay/search.rs +++ b/src/frontend/gui/overlay/search.rs @@ -1,9 +1,8 @@ use crate::frontend::gui::selection::{SelectionCoordinate, SelectionRange}; use crate::frontend::gui::termwindow::TermWindow; use crate::mux::domain::DomainId; +use crate::mux::pane::{Pane, PaneId, Pattern, SearchResult}; use crate::mux::renderable::*; -use crate::mux::tab::{Pane, PaneId}; -use crate::mux::tab::{Pattern, SearchResult}; use portable_pty::PtySize; use rangeset::RangeSet; use std::cell::{RefCell, RefMut}; diff --git a/src/frontend/gui/termwindow.rs b/src/frontend/gui/termwindow.rs index eb1a51ad5..2f7a8923d 100644 --- a/src/frontend/gui/termwindow.rs +++ b/src/frontend/gui/termwindow.rs @@ -19,8 +19,9 @@ use crate::keyassignment::{ InputMap, KeyAssignment, MouseEventTrigger, SpawnCommand, SpawnTabDomain, }; use crate::mux::domain::{DomainId, DomainState}; +use crate::mux::pane::{Pane, PaneId}; use crate::mux::renderable::{RenderableDimensions, StableCursorPosition}; -use crate::mux::tab::{Pane, PaneId, PositionedPane, PositionedSplit, SplitDirection, Tab, TabId}; +use crate::mux::tab::{PositionedPane, PositionedSplit, SplitDirection, Tab, TabId}; use crate::mux::window::WindowId as MuxWindowId; use crate::mux::Mux; use ::wezterm_term::input::MouseButton as TMB; diff --git a/src/keyassignment.rs b/src/keyassignment.rs index 18d4b2958..59102f613 100644 --- a/src/keyassignment.rs +++ b/src/keyassignment.rs @@ -2,7 +2,7 @@ use crate::config::configuration; use crate::config::LeaderKey; use crate::frontend::gui::SelectionMode; use crate::mux::domain::DomainId; -use crate::mux::tab::Pattern; +use crate::mux::pane::Pattern; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::PathBuf; diff --git a/src/localtab.rs b/src/localtab.rs index 90a59a3bb..61ac0c6ed 100644 --- a/src/localtab.rs +++ b/src/localtab.rs @@ -1,7 +1,6 @@ use crate::mux::domain::DomainId; +use crate::mux::pane::{Pane, PaneId, Pattern, SearchResult}; use crate::mux::renderable::Renderable; -use crate::mux::tab::{Pane, PaneId}; -use crate::mux::tab::{Pattern, SearchResult}; use anyhow::Error; use async_trait::async_trait; use portable_pty::{Child, MasterPty, PtySize}; diff --git a/src/main.rs b/src/main.rs index bd4f174dd..2dc42f003 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,8 @@ mod update; use crate::frontend::activity::Activity; use crate::frontend::{front_end, FrontEndSelection}; use crate::mux::domain::{Domain, LocalDomain}; -use crate::mux::tab::{PaneId, SplitDirection}; +use crate::mux::pane::PaneId; +use crate::mux::tab::SplitDirection; use crate::mux::Mux; use crate::server::client::{unix_connect_with_retry, Client}; use crate::server::domain::{ClientDomain, ClientDomainConfig}; diff --git a/src/mux/domain.rs b/src/mux/domain.rs index 4afc800c3..817336079 100644 --- a/src/mux/domain.rs +++ b/src/mux/domain.rs @@ -7,7 +7,8 @@ use crate::config::configuration; use crate::localtab::LocalPane; -use crate::mux::tab::{alloc_pane_id, Pane, PaneId, SplitDirection, Tab, TabId}; +use crate::mux::pane::{alloc_pane_id, Pane, PaneId}; +use crate::mux::tab::{SplitDirection, Tab, TabId}; use crate::mux::window::WindowId; use crate::mux::Mux; use anyhow::{bail, Error}; diff --git a/src/mux/mod.rs b/src/mux/mod.rs index 70ac25719..92da46c4c 100644 --- a/src/mux/mod.rs +++ b/src/mux/mod.rs @@ -1,4 +1,4 @@ -use crate::mux::tab::{Pane, PaneId}; +use crate::mux::pane::{Pane, PaneId}; use crate::mux::tab::{Tab, TabId}; use crate::mux::window::{Window, WindowId}; use crate::ratelim::RateLimiter; @@ -17,6 +17,7 @@ use std::thread; use thiserror::*; pub mod domain; +pub mod pane; pub mod renderable; pub mod tab; pub mod window; diff --git a/src/mux/pane.rs b/src/mux/pane.rs new file mode 100644 index 000000000..e97ef7836 --- /dev/null +++ b/src/mux/pane.rs @@ -0,0 +1,154 @@ +use crate::mux::domain::DomainId; +use crate::mux::renderable::Renderable; +use crate::mux::Mux; +use async_trait::async_trait; +use downcast_rs::{impl_downcast, Downcast}; +use portable_pty::PtySize; +use serde::{Deserialize, Serialize}; +use std::cell::RefMut; +use std::sync::{Arc, Mutex}; +use url::Url; +use wezterm_term::color::ColorPalette; +use wezterm_term::{Clipboard, KeyCode, KeyModifiers, MouseEvent, StableRowIndex}; + +static PANE_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsize::new(0); +pub type PaneId = usize; + +pub fn alloc_pane_id() -> PaneId { + PANE_ID.fetch_add(1, ::std::sync::atomic::Ordering::Relaxed) +} + +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)] +pub enum Pattern { + CaseSensitiveString(String), + CaseInSensitiveString(String), + Regex(String), +} + +impl std::ops::Deref for Pattern { + type Target = String; + fn deref(&self) -> &String { + match self { + Pattern::CaseSensitiveString(s) => s, + Pattern::CaseInSensitiveString(s) => s, + Pattern::Regex(s) => s, + } + } +} + +impl std::ops::DerefMut for Pattern { + fn deref_mut(&mut self) -> &mut String { + match self { + Pattern::CaseSensitiveString(s) => s, + Pattern::CaseInSensitiveString(s) => s, + Pattern::Regex(s) => s, + } + } +} + +#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)] +pub struct SearchResult { + pub start_y: StableRowIndex, + pub end_y: StableRowIndex, + /// The cell index into the line of the start of the match + pub start_x: usize, + /// The cell index into the line of the end of the match + pub end_x: usize, +} + +const PASTE_CHUNK_SIZE: usize = 1024; + +struct Paste { + pane_id: PaneId, + text: String, + offset: usize, +} + +fn schedule_next_paste(paste: &Arc>) { + let paste = Arc::clone(paste); + promise::spawn::spawn(async move { + let mut locked = paste.lock().unwrap(); + let mux = Mux::get().unwrap(); + let pane = mux.get_pane(locked.pane_id).unwrap(); + + let remain = locked.text.len() - locked.offset; + let mut chunk = remain.min(PASTE_CHUNK_SIZE); + + // Make sure we chunk at a char boundary, otherwise the + // slice operation below will panic + while !locked.text.is_char_boundary(locked.offset + chunk) && chunk < remain { + chunk += 1; + } + let text_slice = &locked.text[locked.offset..locked.offset + chunk]; + pane.send_paste(text_slice).unwrap(); + + if chunk < remain { + // There is more to send + locked.offset += chunk; + schedule_next_paste(&paste); + } + }); +} + +/// A Pane represents a view on a terminal +#[async_trait(?Send)] +pub trait Pane: Downcast { + fn pane_id(&self) -> PaneId; + fn renderer(&self) -> RefMut; + fn get_title(&self) -> String; + fn send_paste(&self, text: &str) -> anyhow::Result<()>; + fn reader(&self) -> anyhow::Result>; + fn writer(&self) -> RefMut; + fn resize(&self, size: PtySize) -> anyhow::Result<()>; + /// Called as a hint that the pane is being resized as part of + /// a zoom-to-fill-all-the-tab-space operation. + fn set_zoomed(&self, _zoomed: bool) {} + fn key_down(&self, key: KeyCode, mods: KeyModifiers) -> anyhow::Result<()>; + fn mouse_event(&self, event: MouseEvent) -> anyhow::Result<()>; + fn advance_bytes(&self, buf: &[u8]); + fn is_dead(&self) -> bool; + fn kill(&self) {} + fn palette(&self) -> ColorPalette; + fn domain_id(&self) -> DomainId; + + fn erase_scrollback(&self) {} + + /// Called to advise on whether this tab has focus + fn focus_changed(&self, _focused: bool) {} + + /// Performs a search. + /// If the result is empty then there are no matches. + /// Otherwise, the result shall contain all possible matches. + async fn search(&self, _pattern: Pattern) -> anyhow::Result> { + Ok(vec![]) + } + + /// Returns true if the terminal has grabbed the mouse and wants to + /// give the embedded application a chance to process events. + /// In practice this controls whether the gui will perform local + /// handling of clicks. + fn is_mouse_grabbed(&self) -> bool; + + fn set_clipboard(&self, _clipboard: &Arc) {} + + fn get_current_working_dir(&self) -> Option; + + fn trickle_paste(&self, text: String) -> anyhow::Result<()> { + if text.len() <= PASTE_CHUNK_SIZE { + // Send it all now + self.send_paste(&text)?; + } else { + // It's pretty heavy, so we trickle it into the pty + self.send_paste(&text[0..PASTE_CHUNK_SIZE])?; + + let paste = Arc::new(Mutex::new(Paste { + pane_id: self.pane_id(), + text, + offset: PASTE_CHUNK_SIZE, + })); + schedule_next_paste(&paste); + } + Ok(()) + } +} +impl_downcast!(Pane); diff --git a/src/mux/tab.rs b/src/mux/tab.rs index 772195d3d..ba7d5e95f 100644 --- a/src/mux/tab.rs +++ b/src/mux/tab.rs @@ -1,21 +1,15 @@ use crate::keyassignment::PaneDirection; use crate::mux::domain::DomainId; -use crate::mux::renderable::Renderable; +use crate::mux::pane::*; use crate::mux::{Mux, WindowId}; use crate::server::codec::{PaneEntry, PaneNode}; -use async_trait::async_trait; use bintree::PathBranch; -use downcast_rs::{impl_downcast, Downcast}; use portable_pty::PtySize; use rangeset::range_intersection; use serde::{Deserialize, Serialize}; use std::cell::{RefCell, RefMut}; use std::convert::TryInto; use std::rc::Rc; -use std::sync::{Arc, Mutex}; -use url::Url; -use wezterm_term::color::ColorPalette; -use wezterm_term::{Clipboard, KeyCode, KeyModifiers, MouseEvent, StableRowIndex}; pub type Tree = bintree::Tree, SplitDirectionAndSize>; pub type Cursor = bintree::Cursor, SplitDirectionAndSize>; @@ -23,85 +17,6 @@ pub type Cursor = bintree::Cursor, SplitDirectionAndSize>; static TAB_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsize::new(0); pub type TabId = usize; -static PANE_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsize::new(0); -pub type PaneId = usize; - -pub fn alloc_pane_id() -> PaneId { - PANE_ID.fetch_add(1, ::std::sync::atomic::Ordering::Relaxed) -} - -const PASTE_CHUNK_SIZE: usize = 1024; - -struct Paste { - pane_id: PaneId, - text: String, - offset: usize, -} - -fn schedule_next_paste(paste: &Arc>) { - let paste = Arc::clone(paste); - promise::spawn::spawn(async move { - let mut locked = paste.lock().unwrap(); - let mux = Mux::get().unwrap(); - let pane = mux.get_pane(locked.pane_id).unwrap(); - - let remain = locked.text.len() - locked.offset; - let mut chunk = remain.min(PASTE_CHUNK_SIZE); - - // Make sure we chunk at a char boundary, otherwise the - // slice operation below will panic - while !locked.text.is_char_boundary(locked.offset + chunk) && chunk < remain { - chunk += 1; - } - let text_slice = &locked.text[locked.offset..locked.offset + chunk]; - pane.send_paste(text_slice).unwrap(); - - if chunk < remain { - // There is more to send - locked.offset += chunk; - schedule_next_paste(&paste); - } - }); -} - -#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)] -pub enum Pattern { - CaseSensitiveString(String), - CaseInSensitiveString(String), - Regex(String), -} - -impl std::ops::Deref for Pattern { - type Target = String; - fn deref(&self) -> &String { - match self { - Pattern::CaseSensitiveString(s) => s, - Pattern::CaseInSensitiveString(s) => s, - Pattern::Regex(s) => s, - } - } -} - -impl std::ops::DerefMut for Pattern { - fn deref_mut(&mut self) -> &mut String { - match self { - Pattern::CaseSensitiveString(s) => s, - Pattern::CaseInSensitiveString(s) => s, - Pattern::Regex(s) => s, - } - } -} - -#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)] -pub struct SearchResult { - pub start_y: StableRowIndex, - pub end_y: StableRowIndex, - /// The cell index into the line of the start of the match - pub start_x: usize, - /// The cell index into the line of the end of the match - pub end_x: usize, -} - /// A Tab is a container of Panes pub struct Tab { id: TabId, @@ -1448,72 +1363,13 @@ impl Tab { } } -/// A Pane represents a view on a terminal -#[async_trait(?Send)] -pub trait Pane: Downcast { - fn pane_id(&self) -> PaneId; - fn renderer(&self) -> RefMut; - fn get_title(&self) -> String; - fn send_paste(&self, text: &str) -> anyhow::Result<()>; - fn reader(&self) -> anyhow::Result>; - fn writer(&self) -> RefMut; - fn resize(&self, size: PtySize) -> anyhow::Result<()>; - /// Called as a hint that the pane is being resized as part of - /// a zoom-to-fill-all-the-tab-space operation. - fn set_zoomed(&self, _zoomed: bool) {} - fn key_down(&self, key: KeyCode, mods: KeyModifiers) -> anyhow::Result<()>; - fn mouse_event(&self, event: MouseEvent) -> anyhow::Result<()>; - fn advance_bytes(&self, buf: &[u8]); - fn is_dead(&self) -> bool; - fn kill(&self) {} - fn palette(&self) -> ColorPalette; - fn domain_id(&self) -> DomainId; - - fn erase_scrollback(&self) {} - - /// Called to advise on whether this tab has focus - fn focus_changed(&self, _focused: bool) {} - - /// Performs a search. - /// If the result is empty then there are no matches. - /// Otherwise, the result shall contain all possible matches. - async fn search(&self, _pattern: Pattern) -> anyhow::Result> { - Ok(vec![]) - } - - /// Returns true if the terminal has grabbed the mouse and wants to - /// give the embedded application a chance to process events. - /// In practice this controls whether the gui will perform local - /// handling of clicks. - fn is_mouse_grabbed(&self) -> bool; - - fn set_clipboard(&self, _clipboard: &Arc) {} - - fn get_current_working_dir(&self) -> Option; - - fn trickle_paste(&self, text: String) -> anyhow::Result<()> { - if text.len() <= PASTE_CHUNK_SIZE { - // Send it all now - self.send_paste(&text)?; - } else { - // It's pretty heavy, so we trickle it into the pty - self.send_paste(&text[0..PASTE_CHUNK_SIZE])?; - - let paste = Arc::new(Mutex::new(Paste { - pane_id: self.pane_id(), - text, - offset: PASTE_CHUNK_SIZE, - })); - schedule_next_paste(&paste); - } - Ok(()) - } -} -impl_downcast!(Pane); - #[cfg(test)] mod test { use super::*; + use crate::mux::renderable::Renderable; + use url::Url; + use wezterm_term::color::ColorPalette; + use wezterm_term::{KeyCode, KeyModifiers, MouseEvent}; struct FakePane { id: PaneId, diff --git a/src/server/client.rs b/src/server/client.rs index e1e6819ed..c7288edc3 100644 --- a/src/server/client.rs +++ b/src/server/client.rs @@ -1,7 +1,7 @@ use crate::config::{configuration, SshDomain, TlsDomainClient, UnixDomain}; use crate::connui::ConnectionUI; use crate::mux::domain::{alloc_domain_id, DomainId}; -use crate::mux::tab::PaneId; +use crate::mux::pane::PaneId; use crate::mux::Mux; use crate::server::codec::*; use crate::server::domain::{ClientDomain, ClientDomainConfig}; diff --git a/src/server/codec.rs b/src/server/codec.rs index 5414d0901..6b25fead7 100644 --- a/src/server/codec.rs +++ b/src/server/codec.rs @@ -12,8 +12,9 @@ #![cfg_attr(feature = "cargo-clippy", allow(clippy::range_plus_one))] use crate::mux::domain::DomainId; +use crate::mux::pane::PaneId; use crate::mux::renderable::{RenderableDimensions, StableCursorPosition}; -use crate::mux::tab::{PaneId, SplitDirection, SplitDirectionAndSize, TabId}; +use crate::mux::tab::{SplitDirection, SplitDirectionAndSize, TabId}; use crate::mux::window::WindowId; use anyhow::{bail, Context as _, Error}; use leb128; @@ -771,12 +772,12 @@ pub struct GetLinesResponse { #[derive(Deserialize, Serialize, PartialEq, Debug)] pub struct SearchScrollbackRequest { pub pane_id: PaneId, - pub pattern: crate::mux::tab::Pattern, + pub pattern: crate::mux::pane::Pattern, } #[derive(Deserialize, Serialize, PartialEq, Debug)] pub struct SearchScrollbackResponse { - pub results: Vec, + pub results: Vec, } #[cfg(test)] diff --git a/src/server/domain.rs b/src/server/domain.rs index 1c71356df..6a95e984b 100644 --- a/src/server/domain.rs +++ b/src/server/domain.rs @@ -4,7 +4,8 @@ use crate::font::FontConfiguration; use crate::frontend::front_end; use crate::keyassignment::SpawnTabDomain; use crate::mux::domain::{alloc_domain_id, Domain, DomainId, DomainState}; -use crate::mux::tab::{Pane, PaneId, SplitDirection, Tab, TabId}; +use crate::mux::pane::{Pane, PaneId}; +use crate::mux::tab::{SplitDirection, Tab, TabId}; use crate::mux::window::WindowId; use crate::mux::Mux; use crate::server::client::Client; diff --git a/src/server/listener/sessionhandler.rs b/src/server/listener/sessionhandler.rs index cafaf4ebd..cd375b112 100644 --- a/src/server/listener/sessionhandler.rs +++ b/src/server/listener/sessionhandler.rs @@ -1,6 +1,7 @@ use crate::keyassignment::SpawnTabDomain; +use crate::mux::pane::{Pane, PaneId}; use crate::mux::renderable::{RenderableDimensions, StableCursorPosition}; -use crate::mux::tab::{Pane, PaneId, TabId}; +use crate::mux::tab::TabId; use crate::mux::Mux; use crate::server::codec::*; use crate::server::listener::PKI; @@ -252,7 +253,7 @@ impl SessionHandler { } Pdu::SearchScrollbackRequest(SearchScrollbackRequest { pane_id, pattern }) => { - use crate::mux::tab::Pattern; + use crate::mux::pane::Pattern; async fn do_search(pane_id: TabId, pattern: Pattern) -> anyhow::Result { let mux = Mux::get().unwrap(); diff --git a/src/server/tab/clienttab.rs b/src/server/tab/clienttab.rs index e254e3d6d..31ac2e4ed 100644 --- a/src/server/tab/clienttab.rs +++ b/src/server/tab/clienttab.rs @@ -1,7 +1,8 @@ use crate::config::configuration; use crate::mux::domain::DomainId; +use crate::mux::pane::{alloc_pane_id, Pane, PaneId, Pattern, SearchResult}; use crate::mux::renderable::{Renderable, RenderableDimensions}; -use crate::mux::tab::{alloc_pane_id, Pane, PaneId, Pattern, SearchResult, TabId}; +use crate::mux::tab::TabId; use crate::ratelim::RateLimiter; use crate::server::codec::*; use crate::server::domain::ClientInner; diff --git a/src/ssh.rs b/src/ssh.rs index 50048523a..2f098d22d 100644 --- a/src/ssh.rs +++ b/src/ssh.rs @@ -1,7 +1,8 @@ use crate::connui::ConnectionUI; use crate::localtab::LocalPane; use crate::mux::domain::{alloc_domain_id, Domain, DomainId, DomainState}; -use crate::mux::tab::{alloc_pane_id, Pane, PaneId, SplitDirection, Tab, TabId}; +use crate::mux::pane::{alloc_pane_id, Pane, PaneId}; +use crate::mux::tab::{SplitDirection, Tab, TabId}; use crate::mux::window::WindowId; use crate::mux::Mux; use anyhow::{anyhow, bail, Context, Error}; diff --git a/src/termwiztermtab.rs b/src/termwiztermtab.rs index 8a3a1f57d..b92729c8d 100644 --- a/src/termwiztermtab.rs +++ b/src/termwiztermtab.rs @@ -6,8 +6,9 @@ use crate::font::FontConfiguration; use crate::frontend::front_end; use crate::mux::domain::{alloc_domain_id, Domain, DomainId, DomainState}; +use crate::mux::pane::{alloc_pane_id, Pane, PaneId}; use crate::mux::renderable::Renderable; -use crate::mux::tab::{alloc_pane_id, Pane, PaneId, SplitDirection, Tab, TabId}; +use crate::mux::tab::{SplitDirection, Tab, TabId}; use crate::mux::window::WindowId; use crate::mux::Mux; use anyhow::{bail, Error};