mirror of
https://github.com/neovim/neovim
synced 2025-07-16 17:21:49 +00:00
vim-patch:9.1.0716: resetting setcellwidth() doesn't update the screen (#30274)
Problem: resetting setcellwidth() doesn't update the screen Solution: Redraw after clearing the cellwidth table (Ken Takata) closes: vim/vim#15628539e9b571a
Co-authored-by: Ken Takata <kentkt@csc.jp> (cherry picked from commitd60c753cff
)
This commit is contained in:
committed by
github-actions[bot]
parent
26b72b0f91
commit
886a8b62c5
@ -2782,7 +2782,7 @@ void f_setcellwidths(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
|||||||
xfree(cw_table);
|
xfree(cw_table);
|
||||||
cw_table = NULL;
|
cw_table = NULL;
|
||||||
cw_table_size = 0;
|
cw_table_size = 0;
|
||||||
return;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: use list_T instead of listitem_T so that TV_LIST_ITEM_NEXT can be used properly below.
|
// Note: use list_T instead of listitem_T so that TV_LIST_ITEM_NEXT can be used properly below.
|
||||||
@ -2879,6 +2879,7 @@ void f_setcellwidths(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
xfree(cw_table_save);
|
xfree(cw_table_save);
|
||||||
|
done:
|
||||||
changed_window_setting_all();
|
changed_window_setting_all();
|
||||||
redraw_all_later(UPD_NOT_VALID);
|
redraw_all_later(UPD_NOT_VALID);
|
||||||
}
|
}
|
||||||
|
@ -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&
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user