fix(float): redraw if w_border_adj changed

This commit is contained in:
zeertzjq 2021-10-27 19:22:00 +08:00
parent de670f3809
commit 7ff1bc18a9
2 changed files with 5 additions and 3 deletions

View File

@ -725,8 +725,11 @@ void win_config_float(win_T *wp, FloatConfig fconfig)
bool has_border = wp->w_floating && wp->w_float_config.border; bool has_border = wp->w_floating && wp->w_float_config.border;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
wp->w_border_adj[i] = int new_adj = has_border && wp->w_float_config.border_chars[2 * i + 1][0];
has_border && wp->w_float_config.border_chars[2 * i+1][0]; if (new_adj != wp->w_border_adj[i]) {
change_border = true;
wp->w_border_adj[i] = new_adj;
}
} }
if (!ui_has(kUIMultigrid)) { if (!ui_has(kUIMultigrid)) {

View File

@ -1196,7 +1196,6 @@ describe('float window', function()
meths.win_set_config(win, {border={"", "_", "", "", "", "-", "", ""}}) meths.win_set_config(win, {border={"", "_", "", "", "", "-", "", ""}})
if multigrid then if multigrid then
command('redraw!') -- TODO: without a redraw this test fails, which should be fixed
screen:expect{grid=[[ screen:expect{grid=[[
## grid 1 ## grid 1
[2:----------------------------------------]| [2:----------------------------------------]|