mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-06-25 04:01:51 +02:00
cli: Fixed panic when pressing tab after number
This commit is contained in:
parent
c31001777e
commit
20f61efa7f
@ -203,9 +203,10 @@ impl Completer for RLHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if subscript_digits.len() > 0 {
|
let subscript_char_count = subscript_digits.chars().count();
|
||||||
|
if subscript_char_count > 0 && pos - subscript_char_count > 0 {
|
||||||
let value = kalk::text_utils::normal_to_subscript(subscript_digits.chars());
|
let value = kalk::text_utils::normal_to_subscript(subscript_digits.chars());
|
||||||
return Ok((pos - subscript_digits.chars().count() - 1, vec![value]));
|
return Ok((pos - subscript_char_count - 1, vec![value]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user