Repository: zellij-org/zellij (language: rust)

Issue:
[0.32.0] Unable to rename tabs and panes with spaces
**Basic information**

- `zellij --version`: 0.32.0
- `stty size`: 48 211
- `uname -av`: Linux mybox 6.0.2-76060002-generic #202210150739\~1666289067\~22.04\~fe0ce53 SMP PREEMPT_DYNAMIC Thu O x86_64 x86_64 x86_64 GNU/Linux

**Programs**

- `alacritty --version`: 0.11.0 [8dbaa0b](https://github.com/alacritty/alacritty/commit/8dbaa0bbd308a72075910ff32d8ffcca09ae3529)
- `nu --version`: 0.70.0
- `starship --version`: 1.11.0

**Further information**

With Zellij 0.32.0, I am unable to rename my tabs and panes with spaces in their name such as "audio sharing". When I press the spacebar after typing "audio", it confirms the entry as "audio" and exits out of the rename mode.
I installed Zellij using `cargo install --locked zellij` using Rust 1.64.0.

I downgraded to Zellij 0.31.0 with `cargo install --locked zellij --version 0.31.0` and the renaming behaves as expected there. After confirming this, I upgraded to 0.32.0 again and I see the renaming issue again.

I don't have any configuration for Zellij because I'm happy with the defaults.



Discussion / hints:

Fix patch:
diff --git a/zellij-utils/assets/config/default.kdl b/zellij-utils/assets/config/default.kdl
index 9689be1bad..d048b8e500 100644
--- a/zellij-utils/assets/config/default.kdl
+++ b/zellij-utils/assets/config/default.kdl
@@ -139,7 +139,7 @@ keybinds {
         bind "Alt -" { Resize "Decrease"; }
     }
     shared_except "normal" "locked" {
-        bind "Enter" "Space" "Esc" { SwitchToMode "Normal"; }
+        bind "Enter" "Esc" { SwitchToMode "Normal"; }
     }
     shared_except "pane" "locked" {
         bind "Ctrl p" { SwitchToMode "Pane"; }


Test patch:
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap
index 1231ad635b..ff1a3ff973 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap
@@ -1,6 +1,5 @@
 ---
 source: zellij-utils/src/setup.rs
-assertion_line: 503
 expression: "format!(\"{:#?}\", config)"
 ---
 Config {
@@ -214,13 +213,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '+',
             ): [
@@ -474,13 +466,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -799,13 +784,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '1',
             ): [
@@ -1160,13 +1138,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -1412,13 +1383,6 @@ Config {
                     Search,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -1628,13 +1592,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -1895,13 +1852,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2094,13 +2044,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2293,13 +2236,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -2517,13 +2453,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'h',
             ): [
@@ -2756,13 +2685,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2979,13 +2901,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '"',
             ): [
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap
index a111b68b06..4fb6fe5991 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap
@@ -1,6 +1,5 @@
 ---
 source: zellij-utils/src/setup.rs
-assertion_line: 561
 expression: "format!(\"{:#?}\", config)"
 ---
 Config {
@@ -214,13 +213,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '+',
             ): [
@@ -474,13 +466,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -799,13 +784,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '1',
             ): [
@@ -1160,13 +1138,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -1412,13 +1383,6 @@ Config {
                     Search,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -1628,13 +1592,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -1895,13 +1852,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2094,13 +2044,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2293,13 +2236,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -2517,13 +2453,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'h',
             ): [
@@ -2756,13 +2685,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2979,13 +2901,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '"',
             ): [
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_plugins_override_config_plugins.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_plugins_override_config_plugins.snap
index dc39c74b7e..41604668ce 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_plugins_override_config_plugins.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_plugins_override_config_plugins.snap
@@ -1,6 +1,5 @@
 ---
 source: zellij-utils/src/setup.rs
-assertion_line: 589
 expression: "format!(\"{:#?}\", config)"
 ---
 Config {
@@ -214,13 +213,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '+',
             ): [
@@ -474,13 +466,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -799,13 +784,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '1',
             ): [
@@ -1160,13 +1138,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -1412,13 +1383,6 @@ Config {
                     Search,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -1628,13 +1592,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -1895,13 +1852,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2094,13 +2044,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2293,13 +2236,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -2517,13 +2453,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'h',
             ): [
@@ -2756,13 +2685,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2979,13 +2901,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '"',
             ): [
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap
index 186e6bac9c..91d7c6501f 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap
@@ -1,6 +1,5 @@
 ---
 source: zellij-utils/src/setup.rs
-assertion_line: 603
 expression: "format!(\"{:#?}\", config)"
 ---
 Config {
@@ -214,13 +213,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '+',
             ): [
@@ -474,13 +466,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -799,13 +784,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '1',
             ): [
@@ -1160,13 +1138,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -1412,13 +1383,6 @@ Config {
                     Search,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -1628,13 +1592,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -1895,13 +1852,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2094,13 +2044,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2293,13 +2236,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -2517,13 +2453,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'h',
             ): [
@@ -2756,13 +2685,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2979,13 +2901,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '"',
             ): [
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap
index 85bc693c87..caeaed714c 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap
@@ -1,6 +1,5 @@
 ---
 source: zellij-utils/src/setup.rs
-assertion_line: 575
 expression: "format!(\"{:#?}\", config)"
 ---
 Config {
@@ -214,13 +213,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '+',
             ): [
@@ -474,13 +466,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -799,13 +784,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '1',
             ): [
@@ -1160,13 +1138,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -1412,13 +1383,6 @@ Config {
                     Search,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -1628,13 +1592,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'c',
             ): [
@@ -1895,13 +1852,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2094,13 +2044,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2293,13 +2236,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'd',
             ): [
@@ -2517,13 +2453,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 'h',
             ): [
@@ -2756,13 +2685,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Alt(
                 Char(
                     '+',
@@ -2979,13 +2901,6 @@ Config {
                     Normal,
                 ),
             ],
-            Char(
-                ' ',
-            ): [
-                SwitchToMode(
-                    Normal,
-                ),
-            ],
             Char(
                 '"',
             ): [