0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 9.1.0716: resetting setcellwidth() doesn't update the screen

Problem:  resetting setcellwidth() doesn't update the screen
Solution: Redraw after clearing the cellwidth table (Ken Takata)

closes: #15628

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Ken Takata 2024-09-05 17:19:34 +02:00 committed by Christian Brabandt
parent 150b5078ac
commit 539e9b571a
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
3 changed files with 7 additions and 1 deletions

View File

@ -5644,7 +5644,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
// Clearing the table.
VIM_CLEAR(cw_table);
cw_table_size = 0;
return;
goto done;
}
ptrs = ALLOC_MULT(listitem_T *, l->lv_len);
@ -5756,6 +5756,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
}
vim_free(cw_table_save);
done:
changed_window_setting_all();
redraw_all_later(UPD_CLEAR);
}

View File

@ -228,6 +228,9 @@ func Test_setcellwidths()
call setcellwidths([[0x2103, 0x2103, 2]])
redraw
call assert_equal(19, wincol())
call setcellwidths([])
redraw
call assert_equal((aw == 'single') ? 10 : 19, wincol())
endfor
set ambiwidth& isprint&

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
716,
/**/
715,
/**/