From de8a2f20e98be88b6568d5564e514f8d5fd43981 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 23 Dec 2021 07:41:23 +0800 Subject: vim-patch:8.2.3625: illegal memory access when C-indenting Problem: Illegal memory access when C-indenting. Solution: Also set the cursor column. https://github.com/vim/vim/commit/2de9b7c7c8791da8853a9a7ca9c467867465b655 --- src/nvim/testdir/test_cindent.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_cindent.vim b/src/nvim/testdir/test_cindent.vim index 055b578593..e8f448f96b 100644 --- a/src/nvim/testdir/test_cindent.vim +++ b/src/nvim/testdir/test_cindent.vim @@ -5303,4 +5303,16 @@ func Test_backslash_at_end_of_line() bwipe! endfunc +func Test_find_brace_backwards() + " this was looking beyond the end of the line + new + norm R/* + norm o0{ + norm o// + norm V{= + call assert_equal(['/*', ' 0{', '//'], getline(1, 3)) + bwipe! +endfunc + + " vim: shiftwidth=2 sts=2 expandtab -- cgit