mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'fix-command-tab' into 'master'
fix See merge request veloren/veloren!3439
This commit is contained in:
commit
479affe127
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user