Merge branch 'fix-command-tab' into 'master'

fix

See merge request veloren/veloren!3439
This commit is contained in:
Isse 2022-06-18 14:09:25 +00:00
commit 479affe127

View File

@ -339,7 +339,7 @@ pub fn complete(line: &str, client: &Client, cmd_prefix: char) -> Vec<String> {
if line.starts_with(cmd_prefix) {
let line = line.strip_prefix(cmd_prefix).unwrap_or(line);
let mut iter = line.split_whitespace();
let cmd = iter.next().unwrap();
let cmd = iter.next().unwrap_or("");
let i = iter.count() + if word.is_empty() { 1 } else { 0 };
if i == 0 {
// Completing chat command name. This is the start of the line so the prefix