Move active tabs between spaces

This commit is contained in:
2026-05-07 20:34:38 -04:00
parent 73670bbd85
commit b558b1d979
5 changed files with 109 additions and 8 deletions
+11
View File
@@ -30,6 +30,17 @@ pub(crate) fn new_space_name(command: &str) -> Option<&str> {
None
}
pub(crate) fn move_tab_space_name(command: &str) -> Option<&str> {
let normalized_command = command.to_ascii_lowercase();
for prefix in ["move-tab ", "move tab ", "move-tab-to-space ", "move tab to space "] {
if normalized_command.starts_with(prefix) {
let name = command[prefix.len()..].trim();
return (!name.is_empty()).then_some(name);
}
}
None
}
pub(crate) fn space_icon(name: &str) -> String {
name.chars().next().map_or_else(String::new, |value| value.to_string())
}