Performance improvement in set_tab_width
This commit is contained in:
parent
10ae9a9b16
commit
320b034f5b
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue