Skip to content

Commit 539e9b5

Browse files
k-takatachrisbra
authored andcommitted
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 <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 150b507 commit 539e9b5

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/mbyte.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5644,7 +5644,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
56445644
// Clearing the table.
56455645
VIM_CLEAR(cw_table);
56465646
cw_table_size = 0;
5647-
return;
5647+
goto done;
56485648
}
56495649

56505650
ptrs = ALLOC_MULT(listitem_T *, l->lv_len);
@@ -5756,6 +5756,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
57565756
}
57575757

57585758
vim_free(cw_table_save);
5759+
done:
57595760
changed_window_setting_all();
57605761
redraw_all_later(UPD_CLEAR);
57615762
}

src/testdir/test_utf8.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ func Test_setcellwidths()
228228
call setcellwidths([[0x2103, 0x2103, 2]])
229229
redraw
230230
call assert_equal(19, wincol())
231+
call setcellwidths([])
232+
redraw
233+
call assert_equal((aw == 'single') ? 10 : 19, wincol())
231234
endfor
232235
set ambiwidth& isprint&
233236

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
716,
707709
/**/
708710
715,
709711
/**/

0 commit comments

Comments
 (0)