diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-02 15:05:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-02 15:05:05 +0200 |
commit | 8b89614e69b9b2330539d0482e44f4724053e780 (patch) | |
tree | bd5fc52f3c86d02be678746252ca12e1c863f49d /src/testdir | |
parent | ad486a0f0dd194826fdb733516bf0f35382c9dd7 (diff) | |
download | vim-git-8b89614e69b9b2330539d0482e44f4724053e780.tar.gz |
patch 8.2.1353: crash when drawing double-wide character in terminal windowv8.2.1353
Problem: Crash when drawing double-wide character in terminal window.
(Masato Nishihata)
Solution: Check getcell() returning NULL. (issue #6141)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_terminal.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index fcc11565c..c1ee493cd 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -258,6 +258,21 @@ func Test_terminal_scrape_multibyte() call delete('Xtext') endfunc +func Test_terminal_one_column() + " This creates a terminal, displays a double-wide character and makes the + " window one column wide. This used to cause a crash. + let width = &columns + botright vert term + let buf = bufnr('$') + call term_wait(buf, 100) + exe "set columns=" .. (width / 2) + redraw + call term_sendkeys(buf, "キ") + call term_wait(buf, 10) + exe "set columns=" .. width + exe buf . 'bwipe!' +endfunc + func Test_terminal_scroll() call writefile(range(1, 200), 'Xtext') if has('win32') |