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:
parent
150b5078ac
commit
539e9b571a
@ -5644,7 +5644,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
// Clearing the table.
|
// Clearing the table.
|
||||||
VIM_CLEAR(cw_table);
|
VIM_CLEAR(cw_table);
|
||||||
cw_table_size = 0;
|
cw_table_size = 0;
|
||||||
return;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptrs = ALLOC_MULT(listitem_T *, l->lv_len);
|
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);
|
vim_free(cw_table_save);
|
||||||
|
done:
|
||||||
changed_window_setting_all();
|
changed_window_setting_all();
|
||||||
redraw_all_later(UPD_CLEAR);
|
redraw_all_later(UPD_CLEAR);
|
||||||
}
|
}
|
||||||
|
@ -228,6 +228,9 @@ func Test_setcellwidths()
|
|||||||
call setcellwidths([[0x2103, 0x2103, 2]])
|
call setcellwidths([[0x2103, 0x2103, 2]])
|
||||||
redraw
|
redraw
|
||||||
call assert_equal(19, wincol())
|
call assert_equal(19, wincol())
|
||||||
|
call setcellwidths([])
|
||||||
|
redraw
|
||||||
|
call assert_equal((aw == 'single') ? 10 : 19, wincol())
|
||||||
endfor
|
endfor
|
||||||
set ambiwidth& isprint&
|
set ambiwidth& isprint&
|
||||||
|
|
||||||
|
@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
716,
|
||||||
/**/
|
/**/
|
||||||
715,
|
715,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user