aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/session-manager/src/main.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-03-26 16:37:42 +0100
committerGitHub <noreply@github.com>2024-03-26 16:37:42 +0100
commit631ffd9bc46e9b4f79794525793e0cd2b76a10fa (patch)
tree831e987e3dfbc28a3097f5b5ebae93ef64ab67f1 /default-plugins/session-manager/src/main.rs
parentdocs(changelog): binding ctrl space (diff)
downloadsl0ppij-631ffd9bc46e9b4f79794525793e0cd2b76a10fa.tar.gz
sl0ppij-631ffd9bc46e9b4f79794525793e0cd2b76a10fa.tar.xz
sl0ppij-631ffd9bc46e9b4f79794525793e0cd2b76a10fa.zip
fix(ui): session manager UI fixes (#3226)
* fix(ui): display new session folder prompt always * fix(ui): truncate session name and error on too long a name * fix(ui): scrolling layout list in welcome screen * style(fmt): rustfmt
Diffstat (limited to 'default-plugins/session-manager/src/main.rs')
-rw-r--r--default-plugins/session-manager/src/main.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/default-plugins/session-manager/src/main.rs b/default-plugins/session-manager/src/main.rs
index 7015144f..9f37a34a 100644
--- a/default-plugins/session-manager/src/main.rs
+++ b/default-plugins/session-manager/src/main.rs
@@ -383,6 +383,14 @@ impl State {
fn handle_selection(&mut self) {
match self.active_screen {
ActiveScreen::NewSession => {
+ if self.new_session_info.name().len() >= 108 {
+ // this is due to socket path limitations
+ // TODO: get this from Zellij (for reference: this is part of the interprocess
+ // package, we should get if from there if possible because it's configurable
+ // through the package)
+ self.show_error("Session name must be shorter than 108 bytes");
+ return;
+ }
self.new_session_info.handle_selection(&self.session_name);
},
ActiveScreen::AttachToSession => {