fix: invoke changed_bytes when rewriting <Tab> char #25125

When tabstop and shiftwidth are not equal, tabs are inserted as individual
spaces and then rewritten as tab characters in a second pass. That second pass
did not call changed_bytes which resulted in events being omitted.

Fixes #25092
This commit is contained in:
Ilia Choly
2023-09-15 06:45:51 -04:00
committed by GitHub
parent 28233bcb49
commit f5a09f1b03
2 changed files with 30 additions and 31 deletions

View File

@@ -4429,9 +4429,8 @@ static bool ins_tab(void)
}
}
if (!(State & VREPLACE_FLAG)) {
extmark_splice_cols(curbuf, (int)fpos.lnum - 1, change_col,
cursor->col - change_col, fpos.col - change_col,
kExtmarkUndo);
inserted_bytes(fpos.lnum, change_col,
cursor->col - change_col, fpos.col - change_col);
}
}
cursor->col -= i;