mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
fix(redraw): make redrawdebug=nodelta handle all the cases
Before only win_line lines were considered. this applies nodelta to all screen elements. Causes some failures, which might indeed indicate excessive redraws.
This commit is contained in:
@@ -175,7 +175,7 @@ void grid_put_schar(ScreenGrid *grid, int row, int col, char *schar, int attr)
|
||||
{
|
||||
assert(put_dirty_row == row);
|
||||
size_t off = grid->line_offset[row] + (size_t)col;
|
||||
if (grid->attrs[off] != attr || schar_cmp(grid->chars[off], schar)) {
|
||||
if (grid->attrs[off] != attr || schar_cmp(grid->chars[off], schar) || rdb_flags & RDB_NODELTA) {
|
||||
schar_copy(grid->chars[off], schar);
|
||||
grid->attrs[off] = attr;
|
||||
|
||||
@@ -280,7 +280,8 @@ void grid_puts_len(ScreenGrid *grid, char *text, int textlen, int row, int col,
|
||||
need_redraw = schar_cmp(grid->chars[off], buf)
|
||||
|| (mbyte_cells == 2 && grid->chars[off + 1][0] != 0)
|
||||
|| grid->attrs[off] != attr
|
||||
|| exmode_active;
|
||||
|| exmode_active
|
||||
|| rdb_flags & RDB_NODELTA;
|
||||
|
||||
if (need_redraw) {
|
||||
// When at the end of the text and overwriting a two-cell
|
||||
@@ -412,8 +413,7 @@ void grid_fill(ScreenGrid *grid, int start_row, int end_row, int start_col, int
|
||||
size_t lineoff = grid->line_offset[row];
|
||||
for (col = start_col; col < end_col; col++) {
|
||||
size_t off = lineoff + (size_t)col;
|
||||
if (schar_cmp(grid->chars[off], sc)
|
||||
|| grid->attrs[off] != attr) {
|
||||
if (schar_cmp(grid->chars[off], sc) || grid->attrs[off] != attr || rdb_flags & RDB_NODELTA) {
|
||||
schar_copy(grid->chars[off], sc);
|
||||
grid->attrs[off] = attr;
|
||||
if (dirty_first == INT_MAX) {
|
||||
@@ -605,7 +605,8 @@ void grid_put_linebuf(ScreenGrid *grid, int row, int coloff, int endcol, int cle
|
||||
while (col < clear_width) {
|
||||
if (grid->chars[off_to][0] != ' '
|
||||
|| grid->chars[off_to][1] != NUL
|
||||
|| grid->attrs[off_to] != bg_attr) {
|
||||
|| grid->attrs[off_to] != bg_attr
|
||||
|| rdb_flags & RDB_NODELTA) {
|
||||
grid->chars[off_to][0] = ' ';
|
||||
grid->chars[off_to][1] = NUL;
|
||||
grid->attrs[off_to] = bg_attr;
|
||||
|
Reference in New Issue
Block a user