Mercurial > vim
comparison src/testdir/test_cmdline.vim @ 29259:a5846b82119b v8.2.5148
patch 8.2.5148: invalid memory access when using expression on command line
Commit: https://github.com/vim/vim/commit/6046aded8da002b08d380db29de2ba0268b6616e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 22 13:51:54 2022 +0100
patch 8.2.5148: invalid memory access when using expression on command line
Problem: Invalid memory access when using an expression on the command line.
Solution: Make sure the position does not go negative.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 22 Jun 2022 15:00:05 +0200 |
parents | 3de91964bbd6 |
children | 8408ffd9af69 |
comparison
equal
deleted
inserted
replaced
29258:df2509261185 | 29259:a5846b82119b |
---|---|
1983 call assert_beeps('call feedkeys(":\<C-\>einvalid\<CR>", "tx")') | 1983 call assert_beeps('call feedkeys(":\<C-\>einvalid\<CR>", "tx")') |
1984 | 1984 |
1985 " Insert literal <CTRL-\> in the command line | 1985 " Insert literal <CTRL-\> in the command line |
1986 call feedkeys(":\"e \<C-\>\<C-Y>\<CR>", 'xt') | 1986 call feedkeys(":\"e \<C-\>\<C-Y>\<CR>", 'xt') |
1987 call assert_equal("\"e \<C-\>\<C-Y>", @:) | 1987 call assert_equal("\"e \<C-\>\<C-Y>", @:) |
1988 endfunc | |
1989 | |
1990 " This was making the insert position negative | |
1991 func Test_cmdline_expr_register() | |
1992 exe "sil! norm! ?\<C-\>e0\<C-R>0\<Esc>?\<C-\>e0\<CR>" | |
1988 endfunc | 1993 endfunc |
1989 | 1994 |
1990 " Test for 'imcmdline' and 'imsearch' | 1995 " Test for 'imcmdline' and 'imsearch' |
1991 " This test doesn't actually test the input method functionality. | 1996 " This test doesn't actually test the input method functionality. |
1992 func Test_cmdline_inputmethod() | 1997 func Test_cmdline_inputmethod() |