Mercurial > vim
diff src/testdir/test_utf8.vim @ 31678:9e1062b4aa94 v9.0.1171
patch 9.0.1171: screen is not redrawn after using setcellwidths()
Commit: https://github.com/vim/vim/commit/2bc849ff811059d25310399f982c6706faa7eb35
Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Date: Tue Jan 10 16:03:08 2023 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 10 Jan 2023 17:15:02 +0100 |
parents | adb0de8be4ce |
children | f348559ce426 |
line wrap: on
line diff
--- a/src/testdir/test_utf8.vim +++ b/src/testdir/test_utf8.vim @@ -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