comparison src/testdir/test_regexp_latin.vim @ 29410:be069ab9d583 v9.0.0047

patch 9.0.0047: using freed memory with recursive substitute Commit: https://github.com/vim/vim/commit/32acf1f1a72ebb9d8942b9c9d80023bf1bb668ea Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 7 22:20:31 2022 +0100 patch 9.0.0047: using freed memory with recursive substitute Problem: Using freed memory with recursive substitute. Solution: Always make a copy for reg_prev_sub.
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 Jul 2022 23:30:02 +0200
parents e25196adb7c1
children 1ad5585bed52
comparison
equal deleted inserted replaced
29409:928bf80ce1e8 29410:be069ab9d583
1112 endfor 1112 endfor
1113 call assert_equal(['xx', 'xx', 'xx'], getline(1, '$')) 1113 call assert_equal(['xx', 'xx', 'xx'], getline(1, '$'))
1114 bwipe! 1114 bwipe!
1115 endfunc 1115 endfunc
1116 1116
1117 func Test_recursive_substitute_expr()
1118 new
1119 func Repl()
1120 s
1121 endfunc
1122 silent! s/\%')/~\=Repl()
1123
1124 bwipe!
1125 delfunc Repl
1126 endfunc
1127
1117 " vim: shiftwidth=2 sts=2 expandtab 1128 " vim: shiftwidth=2 sts=2 expandtab