comparison src/testdir/test_tagjump.vim @ 18293:1c5974759bcd v8.1.2141

patch 8.1.2141: :tselect has an extra hit-enter prompt Commit: https://github.com/vim/vim/commit/e8070987c6ca9b1e14c5305707c6d29c8e58e7c4 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 12 17:07:06 2019 +0200 patch 8.1.2141: :tselect has an extra hit-enter prompt Problem: :tselect has an extra hit-enter prompt. Solution: Do not set need_wait_return when only moving the cursor. (closes #5040)
author Bram Moolenaar <Bram@vim.org>
date Sat, 12 Oct 2019 17:15:04 +0200
parents 7a19c8d6bb9e
children b0b37bd807ba
comparison
equal deleted inserted replaced
18292:d10f337d9fd3 18293:1c5974759bcd
1 " Tests for tagjump (tags and special searches) 1 " Tests for tagjump (tags and special searches)
2
3 source check.vim
4 source screendump.vim
2 5
3 " SEGV occurs in older versions. (At least 7.4.1748 or older) 6 " SEGV occurs in older versions. (At least 7.4.1748 or older)
4 func Test_ptag_with_notagstack() 7 func Test_ptag_with_notagstack()
5 set notagstack 8 set notagstack
6 call assert_fails('ptag does_not_exist_tag_name', 'E426') 9 call assert_fails('ptag does_not_exist_tag_name', 'E426')
471 call delete('Xtags') 474 call delete('Xtags')
472 set tags& 475 set tags&
473 let &verbose = old_vbs 476 let &verbose = old_vbs
474 endfunc 477 endfunc
475 478
479 " Check that using :tselect does not run into the hit-enter prompt.
480 " Requires a terminal to trigger that prompt.
481 func Test_tselect()
482 CheckScreendump
483
484 call writefile([
485 \ 'main Xtest.h /^void test();$/;" f',
486 \ 'main Xtest.c /^int main()$/;" f',
487 \ 'main Xtest.x /^void test()$/;" f',
488 \ ], 'Xtags')
489 cal writefile([
490 \ 'int main()',
491 \ 'void test()',
492 \ ], 'Xtest.c')
493
494 let lines =<< trim [SCRIPT]
495 set tags=Xtags
496 [SCRIPT]
497 call writefile(lines, 'XTest_tselect')
498 let buf = RunVimInTerminal('-S XTest_tselect', {'rows': 10, 'cols': 50})
499
500 call term_wait(buf, 100)
501 call term_sendkeys(buf, ":tselect main\<CR>2\<CR>")
502 call VerifyScreenDump(buf, 'Test_tselect_1', {})
503
504 call delete('Xtags')
505 call delete('Xtest.c')
506 call delete('XTest_tselect')
507 endfunc
508
476 " vim: shiftwidth=2 sts=2 expandtab 509 " vim: shiftwidth=2 sts=2 expandtab