To: vim_dev@googlegroups.com Subject: Patch 8.1.2141 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2141 Problem: :tselect has an extra hit-enter prompt. Solution: Do not set need_wait_return when only moving the cursor. (closes #5040) Files: src/message.c, src/testdir/test_tagjump.vim, src/testdir/dumps/Test_tselect_1.dump *** ../vim-8.1.2140/src/message.c 2019-09-27 13:32:03.068515072 +0200 --- src/message.c 2019-10-12 16:59:55.184194341 +0200 *************** *** 1980,1994 **** attr &= ~MSG_HIST; } ! /* ! * When writing something to the screen after it has scrolled, requires a ! * wait-return prompt later. Needed when scrolling, resetting ! * need_wait_return after some prompt, and then outputting something ! * without scrolling ! */ ! if (msg_scrolled != 0 && !msg_scrolled_ign) need_wait_return = TRUE; ! msg_didany = TRUE; /* remember that something was outputted */ /* * If there is no valid screen, use fprintf so we can see error messages. --- 1980,1993 ---- attr &= ~MSG_HIST; } ! // When writing something to the screen after it has scrolled, requires a ! // wait-return prompt later. Needed when scrolling, resetting ! // need_wait_return after some prompt, and then outputting something ! // without scrolling ! // Not needed when only using CR to move the cursor. ! if (msg_scrolled != 0 && !msg_scrolled_ign && STRCMP(str, "\r") != 0) need_wait_return = TRUE; ! msg_didany = TRUE; // remember that something was outputted /* * If there is no valid screen, use fprintf so we can see error messages. *** ../vim-8.1.2140/src/testdir/test_tagjump.vim 2019-09-06 22:45:47.578271556 +0200 --- src/testdir/test_tagjump.vim 2019-10-12 17:01:35.343767681 +0200 *************** *** 1,5 **** --- 1,8 ---- " Tests for tagjump (tags and special searches) + source check.vim + source screendump.vim + " SEGV occurs in older versions. (At least 7.4.1748 or older) func Test_ptag_with_notagstack() set notagstack *************** *** 473,476 **** --- 476,509 ---- let &verbose = old_vbs endfunc + " Check that using :tselect does not run into the hit-enter prompt. + " Requires a terminal to trigger that prompt. + func Test_tselect() + CheckScreendump + + call writefile([ + \ 'main Xtest.h /^void test();$/;" f', + \ 'main Xtest.c /^int main()$/;" f', + \ 'main Xtest.x /^void test()$/;" f', + \ ], 'Xtags') + cal writefile([ + \ 'int main()', + \ 'void test()', + \ ], 'Xtest.c') + + let lines =<< trim [SCRIPT] + set tags=Xtags + [SCRIPT] + call writefile(lines, 'XTest_tselect') + let buf = RunVimInTerminal('-S XTest_tselect', {'rows': 10, 'cols': 50}) + + call term_wait(buf, 100) + call term_sendkeys(buf, ":tselect main\2\") + call VerifyScreenDump(buf, 'Test_tselect_1', {}) + + call delete('Xtags') + call delete('Xtest.c') + call delete('XTest_tselect') + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.1.2140/src/testdir/dumps/Test_tselect_1.dump 2019-10-12 17:05:45.426707950 +0200 --- src/testdir/dumps/Test_tselect_1.dump 2019-10-12 17:00:05.328151049 +0200 *************** *** 0 **** --- 1,10 ---- + >i+0#00e0003#ffffff0|n|t| +0#0000000&|m|a|i|n|(|)| @39 + |v+0#00e0003&|o|i|d| +0#0000000&|t|e|s|t|(|)| @38 + |~+0#4040ff13&| @48 + |~| @48 + |~| @48 + |~| @48 + |~| @48 + |~| @48 + |~| @48 + |"+0#0000000&|X|t|e|s|t|.|c|"| |2|L|,| |2|3|C| @14|1|,|1| @10|A|l@1| *** ../vim-8.1.2140/src/version.c 2019-10-12 16:12:50.968492825 +0200 --- src/version.c 2019-10-12 16:48:25.043203081 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 2141, /**/ -- Men may not be seen publicly in any kind of strapless gown. [real standing law in Florida, United States of America] /// 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 ///