To: vim_dev@googlegroups.com Subject: Patch 8.0.1645 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1645 Problem: Test for terminal response to escape sequence fails for some people. (toothpik) Solution: Run "cat" and let it echo the characters. Files: src/testdir/test_terminal.vim *** ../vim-8.0.1644/src/testdir/test_terminal.vim 2018-03-25 20:31:28.964620010 +0200 --- src/testdir/test_terminal.vim 2018-03-25 21:23:05.162044769 +0200 *************** *** 833,857 **** endif let buf = Run_shell_in_terminal({}) ! call WaitFor({-> term_getline(buf, 1) != ""}) ! call writefile(["\x1b[6n"], 'Xescape') ! call term_sendkeys(buf, "cat Xescape\") ! " wait for the response of control sequence from libvterm (and send it to tty) ! sleep 200m ! call term_wait(buf) " Wait for output from tty to display, below an empty line. ! " It should show \e3;1R, but only 1R may show up ! call assert_match('\<\d\+R', term_getline(buf, 3)) ! call term_sendkeys(buf, "\") ! call term_wait(buf) ! call Stop_shell_in_terminal(buf) exe buf . 'bwipe' - call delete('Xescape') unlet g:job endfunc --- 833,854 ---- endif let buf = Run_shell_in_terminal({}) ! call WaitFor({-> term_getline(buf, 1) != ''}) ! call term_sendkeys(buf, "cat\") ! call WaitFor({-> term_getline(buf, 1) =~ 'cat'}) ! " Request the cursor position. ! call term_sendkeys(buf, "\x1b[6n\") " Wait for output from tty to display, below an empty line. ! call WaitFor({-> term_getline(buf, 4) =~ '3;1R'}) ! " End "cat" gently. ! call term_sendkeys(buf, "\\") + call Stop_shell_in_terminal(buf) exe buf . 'bwipe' unlet g:job endfunc *** ../vim-8.0.1644/src/version.c 2018-03-25 20:31:28.964620010 +0200 --- src/version.c 2018-03-25 21:23:25.837921536 +0200 *************** *** 768,769 **** --- 768,771 ---- { /* Add new patch number below this line */ + /**/ + 1645, /**/ -- hundred-and-one symptoms of being an internet addict: 60. As your car crashes through the guardrail on a mountain road, your first instinct is to search for the "back" button. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///