Patch 8.2.5078

6 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 12, 2022, 6:18:12 AM6/12/22
to vim...@googlegroups.com

Patch 8.2.5078
Problem: Substitute test has a one second delay.
Solution: Use ":silent!". Add another test case. (closes #10558)
Files: src/testdir/test_substitute.vim


*** ../vim-8.2.5077/src/testdir/test_substitute.vim 2022-05-30 16:01:38.999629604 +0100
--- src/testdir/test_substitute.vim 2022-06-12 11:08:15.340386671 +0100
***************
*** 469,475 ****
for t in a:tests
let start = line('.') + 1
let end = start + len(t[2]) - 1
- " TODO: why is there a one second delay the first time we get here?
exe "normal o" . t[0]
call cursor(start, 1)
exe t[1]
--- 469,474 ----
***************
*** 504,510 ****
\ ['sSs', 's/S/\c/', ['scs']],
\ ['tTt', "s/T/\<C-V>\<C-J>/", ["t\<C-V>\<C-J>t"]],
\ ['U', 's/U/\L\uuUu\l\EU/', ['UuuU']],
! \ ['V', 's/V/\U\lVvV\u\Ev/', ['vVVv']]
\ ]
call Run_SubCmd_Tests(tests)
endfunc
--- 503,510 ----
\ ['sSs', 's/S/\c/', ['scs']],
\ ['tTt', "s/T/\<C-V>\<C-J>/", ["t\<C-V>\<C-J>t"]],
\ ['U', 's/U/\L\uuUu\l\EU/', ['UuuU']],
! \ ['V', 's/V/\U\lVvV\u\Ev/', ['vVVv']],
! \ ['\', 's/\\/\\\\/', ['\\']]
\ ]
call Run_SubCmd_Tests(tests)
endfunc
***************
*** 535,541 ****
\ ['sSs', 's/S/\c/', ['scs']],
\ ['tTt', "s/T/\<C-V>\<C-J>/", ["t\<C-V>\<C-J>t"]],
\ ['U', 's/U/\L\uuUu\l\EU/', ['UuuU']],
! \ ['V', 's/V/\U\lVvV\u\Ev/', ['vVVv']]
\ ]
call Run_SubCmd_Tests(tests)
endfunc
--- 535,542 ----
\ ['sSs', 's/S/\c/', ['scs']],
\ ['tTt', "s/T/\<C-V>\<C-J>/", ["t\<C-V>\<C-J>t"]],
\ ['U', 's/U/\L\uuUu\l\EU/', ['UuuU']],
! \ ['V', 's/V/\U\lVvV\u\Ev/', ['vVVv']],
! \ ['\', 's/\\/\\\\/', ['\\']]
\ ]
call Run_SubCmd_Tests(tests)
endfunc
***************
*** 690,699 ****
endfunc
new
call setline(1, ['1 aaa', '2 aaa', '3 aaa'])
! %s/aaa/\=Foo()/g
call assert_equal(['1 0', '2 0', '3 0'], getline(1, 3))

! " Trow without try-catch causes abort after the first line.
" We cannot test this, since it would stop executing the test script.

" try/catch does not result in any changes
--- 691,701 ----
endfunc
new
call setline(1, ['1 aaa', '2 aaa', '3 aaa'])
! " need silent! to avoid a delay when entering Insert mode
! silent! %s/aaa/\=Foo()/g
call assert_equal(['1 0', '2 0', '3 0'], getline(1, 3))

! " Throw without try-catch causes abort after the first line.
" We cannot test this, since it would stop executing the test script.

" try/catch does not result in any changes
*** ../vim-8.2.5077/src/version.c 2022-06-11 10:43:16.573008233 +0100
--- src/version.c 2022-06-12 11:12:34.748403065 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5078,
/**/

--
SIGFUN -- signature too funny (core dumped)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages