diff options
author | Blaž Hrastnik | 2021-06-02 04:06:57 +0000 |
---|---|---|
committer | GitHub | 2021-06-02 04:06:57 +0000 |
commit | 22dad592b87c971e3263bd3cf24c9f9ac3591676 (patch) | |
tree | 7a95df32c346a3d49ea0254798f5dd6cc394c12a /helix-term/src | |
parent | 67b1cd32c75f5772f6b9ed2922313eb73167f40a (diff) | |
parent | 4d12c7c3cf74a9903dc2a72bde19d94e800f505f (diff) |
Merge pull request #40 from data0x200/fix-empty-command
Fix empty command cause panic
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/commands.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 3dba9333..6465241f 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1031,6 +1031,9 @@ pub fn command_mode(cx: &mut Context) { } let parts = input.split_ascii_whitespace().collect::<Vec<&str>>(); + if parts.is_empty() { + return; + } if let Some(cmd) = cmd::COMMANDS.get(parts[0]) { (cmd.fun)(editor, &parts[1..], event); |