Performance improvement in set_tab_width

This commit is contained in:
Jeremy Soller 2024-06-10 10:20:12 -06:00
parent 10ae9a9b16
commit 320b034f5b

View file

@ -596,8 +596,10 @@ impl Buffer {
self.tab_width = tab_width;
// Shaping must be reset when tab width is changed
for line in self.lines.iter_mut() {
if line.text().contains('\t') {
line.reset_shaping();
if line.shape_opt().is_some() {
if line.text().contains('\t') {
line.reset_shaping();
}
}
}
self.redraw = true;