on master help sign in
Fix empty command cause panic
commit4d12c7c3cf74a9903dc2a72bde19d94e800f505f authorDaichi Takamiya <data0x200@gmail.com> dateWed 2 Jun 2021, 10:48 (5 years ago) parentdbc392d
1 file changed+3
helix-term/src/commands.rs+3
helix-term/src/commands.rs+3
@@ -1031,6 +1031,9 @@ pub fn command_mode(cx: &mut Context) {
10311031 }
10321032
10331033 let parts = input.split_ascii_whitespace().collect::<Vec<&str>>();
1034+ if parts.is_empty() {
1035+ return;
1036+ }
10341037
10351038 if let Some(cmd) = cmd::COMMANDS.get(parts[0]) {
10361039 (cmd.fun)(editor, &parts[1..], event);