diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2023-01-10 16:03:08 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-10 16:03:08 +0000 |
commit | 2bc849ff811059d25310399f982c6706faa7eb35 (patch) | |
tree | 1568860af18584b319a18c426162e52751b680d2 /src | |
parent | 523f22d57794a73495aa49f667d7f90cc9c8b5c6 (diff) |
patch 9.0.1171: screen is not redrawn after using setcellwidths()v9.0.1171
Problem: Screen is not redrawn after using setcellwidths().
Solution: Redraw the screen when the cell widths have changed. (Yasuhiro
Matsumoto, closes #11800)
Diffstat (limited to 'src')
-rw-r--r-- | src/mbyte.c | 1 | ||||
-rw-r--r-- | src/testdir/dumps/Test_setcellwidths_dump_1.dump | 6 | ||||
-rw-r--r-- | src/testdir/dumps/Test_setcellwidths_dump_2.dump | 6 | ||||
-rw-r--r-- | src/testdir/test_utf8.vim | 17 | ||||
-rw-r--r-- | src/version.c | 2 |
5 files changed, 32 insertions, 0 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index aa2b177ce6..1570cef231 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -5742,6 +5742,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED) } vim_free(cw_table_save); + redraw_all_later(UPD_CLEAR); } void diff --git a/src/testdir/dumps/Test_setcellwidths_dump_1.dump b/src/testdir/dumps/Test_setcellwidths_dump_1.dump new file mode 100644 index 0000000000..0bb2788f14 --- /dev/null +++ b/src/testdir/dumps/Test_setcellwidths_dump_1.dump @@ -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| diff --git a/src/testdir/dumps/Test_setcellwidths_dump_2.dump b/src/testdir/dumps/Test_setcellwidths_dump_2.dump new file mode 100644 index 0000000000..f7b4b0f336 --- /dev/null +++ b/src/testdir/dumps/Test_setcellwidths_dump_2.dump @@ -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| diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim index bb99cb3e60..935af7ebf7 100644 --- 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 diff --git a/src/version.c b/src/version.c index b3efaabc40..da397ee4b4 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1171, +/**/ 1170, /**/ 1169, |