fix wrong spelling

This commit is contained in:
IsseW 2022-05-16 00:06:57 +02:00
parent fb7aa07b01
commit bd53d0b354

View File

@ -678,11 +678,11 @@ impl<'a> Widget for Chat<'a> {
fn do_tab_completion(cursor: usize, input: &str, word: &str) -> (String, usize) { fn do_tab_completion(cursor: usize, input: &str, word: &str) -> (String, usize) {
let mut pre_ws = None; let mut pre_ws = None;
let mut post_ws = None; let mut post_ws = None;
let mut in_qoutation = false; let mut in_quotation = false;
for (char_i, (byte_i, c)) in input.char_indices().enumerate() { for (char_i, (byte_i, c)) in input.char_indices().enumerate() {
if c == '"' { if c == '"' {
in_qoutation = !in_qoutation; in_quotation = !in_quotation;
} else if !in_qoutation && c.is_whitespace() && c != '\t' { } else if !in_quotation && c.is_whitespace() && c != '\t' {
if char_i < cursor { if char_i < cursor {
pre_ws = Some(byte_i); pre_ws = Some(byte_i);
} else { } else {