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

patch 9.0.1171: screen is not redrawn after using setcellwidths()

Problem:    Screen is not redrawn after using setcellwidths().
Solution:   Redraw the screen when the cell widths have changed. (Yasuhiro
            Matsumoto, closes #11800)
This commit is contained in:
Yasuhiro Matsumoto 2023-01-10 16:03:08 +00:00 committed by Bram Moolenaar
parent 523f22d577
commit 2bc849ff81
5 changed files with 32 additions and 0 deletions

View File

@ -5742,6 +5742,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
}
vim_free(cw_table_save);
redraw_all_later(UPD_CLEAR);
}
void

View File

@ -0,0 +1,6 @@
>+0&#ffffff0|D|e|s|k|t|o|p| @66
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|,|1| @10|A|l@1|

View File

@ -0,0 +1,6 @@
>+0&#ffffff0| |D|e|s|k|t|o|p| @65
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|,|1| @10|A|l@1|

View File

@ -2,6 +2,7 @@
source check.vim
source view_util.vim
source screendump.vim
" Visual block Insert adjusts for multi-byte char
func Test_visual_block_insert()
@ -198,6 +199,22 @@ func Test_setcellwidths()
call setcellwidths([])
endfunc
func Test_setcellwidths_dump()
CheckRunVimInTerminal
let lines =<< trim END
call setline(1, "\ue5ffDesktop")
END
call writefile(lines, 'XCellwidths', 'D')
let buf = RunVimInTerminal('-S XCellwidths', {'rows': 6})
call VerifyScreenDump(buf, 'Test_setcellwidths_dump_1', {})
call term_sendkeys(buf, ":call setcellwidths([[0xe5ff, 0xe5ff, 2]])\<CR>")
call VerifyScreenDump(buf, 'Test_setcellwidths_dump_2', {})
call StopVimInTerminal(buf)
endfunc
func Test_print_overlong()
" Text with more composing characters than MB_MAXBYTES.
new

View File

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