mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-27 14:34:32 +03:00
fix(compatibility): do not crash when padding before wide char (#540)
* fix(compatibility): do not crash when padding before wide char * style(clippy): make less clear because clippy
This commit is contained in:
parent
774858f240
commit
12709e3e48
@ -1769,6 +1769,8 @@ impl Row {
|
||||
let mut replace_with = vec![terminal_character; to + width_of_current_character];
|
||||
if to_position_accounting_for_widechars > self.columns.len() {
|
||||
self.columns.clear();
|
||||
} else if to_position_accounting_for_widechars >= self.columns.len() {
|
||||
drop(self.columns.drain(0..to_position_accounting_for_widechars));
|
||||
} else {
|
||||
drop(self.columns.drain(0..=to_position_accounting_for_widechars));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user