comparison src/testdir/test_cmdline.vim @ 29365:98de9a961a64 v9.0.0025

patch 9.0.0025: accessing beyond allocated memory with the cmdline window Commit: https://github.com/vim/vim/commit/c6fdb15d423df22e1776844811d082322475e48a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 2 13:43:21 2022 +0100 patch 9.0.0025: accessing beyond allocated memory with the cmdline window Problem: Accessing beyond allocated memory when using the cmdline window in Ex mode. Solution: Use "*" instead of "'<,'>" for Visual mode.
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Jul 2022 14:45:03 +0200
parents 8408ffd9af69
children b1f345ec827e
comparison
equal deleted inserted replaced
29364:bf86439e9d05 29365:98de9a961a64
2099 %bw! 2099 %bw!
2100 let s = '' 2100 let s = ''
2101 exe "normal q:a\<C-C>let s='Hello'\<CR>" 2101 exe "normal q:a\<C-C>let s='Hello'\<CR>"
2102 call assert_equal('Hello', s) 2102 call assert_equal('Hello', s)
2103 call assert_equal(1, winnr('$')) 2103 call assert_equal(1, winnr('$'))
2104 endfunc
2105
2106 func Test_cmdwin_ex_mode_with_modifier()
2107 " this was accessing memory after allocated text in Ex mode
2108 new
2109 call setline(1, ['some', 'text', 'lines'])
2110 silent! call feedkeys("gQnormal vq:atopleft\<C-V>\<CR>\<CR>", 'xt')
2111 bwipe!
2104 endfunc 2112 endfunc
2105 2113
2106 " test that ";" works to find a match at the start of the first line 2114 " test that ";" works to find a match at the start of the first line
2107 func Test_zero_line_search() 2115 func Test_zero_line_search()
2108 new 2116 new