comparison src/testdir/test_tagjump.vim @ 25652:ca61340ac1b9 v8.2.3362

patch 8.2.3362: buffer overflow when completing long tag name Commit: https://github.com/vim/vim/commit/489d60996deb5e7c1a3b4633412d54632e6def42 Author: Gregory Anders <greg@gpanders.com> Date: Sat Aug 21 16:21:19 2021 +0200 patch 8.2.3362: buffer overflow when completing long tag name Problem: Buffer overflow when completing long tag name. Solution: Allocate the buffer dynamically. (Gregory Anders, closes https://github.com/vim/vim/issues/8769)
author Bram Moolenaar <Bram@vim.org>
date Sat, 21 Aug 2021 16:30:04 +0200
parents f4aa891a5ab8
children b65a50d2fa4f
comparison
equal deleted inserted replaced
25651:3066656a3860 25652:ca61340ac1b9
603 \ 'four', 603 \ 'four',
604 \ ], 'Xsomewhere') 604 \ ], 'Xsomewhere')
605 tag foobar 605 tag foobar
606 call assert_equal('Xsomewhere', expand('%')) 606 call assert_equal('Xsomewhere', expand('%'))
607 call assert_equal(3, getcurpos()[1]) 607 call assert_equal(3, getcurpos()[1])
608
609 " expansion on command line works with long lines when &wildoptions contains
610 " 'tagfile'
611 set wildoptions=tagfile
612 call writefile([
613 \ 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa file /^pattern$/;" f'
614 \ ], 'Xtags')
615 call feedkeys(":tag \<Tab>", 'tx')
616 " Should not crash
617 call assert_true(v:true)
608 618
609 call delete('Xtags') 619 call delete('Xtags')
610 call delete('Xsomewhere') 620 call delete('Xsomewhere')
611 set tags& 621 set tags&
612 let &verbose = old_vbs 622 let &verbose = old_vbs