Mercurial > vim
changeset 27004:671664c5faa4 v8.2.4031
patch 8.2.4031: crash in xterm with only two lines
Commit: https://github.com/vim/vim/commit/d1f34e64f0e1a9ddaed76623bc40e669f2d09260
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 7 19:24:20 2022 +0000
patch 8.2.4031: crash in xterm with only two lines
Problem: Crash in xterm with only two lines. (Dominique Pell?)
Solution: Only perform xterm compatibility test if possible. (closes https://github.com/vim/vim/issues/9488)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 07 Jan 2022 20:30:04 +0100 |
parents | ee78c4d9035d |
children | c0647304fb69 |
files | src/term.c src/testdir/test_startup.vim src/version.c |
diffstat | 3 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/term.c +++ b/src/term.c @@ -3801,7 +3801,7 @@ check_terminal_behavior(void) line_was_clobbered(1); } - if (xcc_status.tr_progress == STATUS_GET) + if (xcc_status.tr_progress == STATUS_GET && Rows > 2) { // 2. Check compatibility with xterm. // We move the cursor to (2, 0), print a test sequence and then query
--- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -821,6 +821,17 @@ func Test_start_with_tabs() call StopVimInTerminal(buf) endfunc +func Test_start_in_minimal_window() + CheckRunVimInTerminal + + let buf = RunVimInTerminal('-c "set nomore"', {'cols': 12, 'rows': 2, 'keep_t_u7': 1}) + call term_sendkeys(buf, "ahello\<Esc>") + call WaitForAssert({-> assert_match('^hello', term_getline(buf, 1))}) + + " clean up + call StopVimInTerminal(buf) +endfunc + func Test_v_argv() " Can't catch the output of gvim. CheckNotGui