Mercurial > vim
comparison src/testdir/test_virtualedit.vim @ 32094:7d94b1c0f292 v9.0.1378
patch 9.0.1378: illegal memory access when using virtual editing
Commit: https://github.com/vim/vim/commit/c99cbf8f289bdda5d4a77d7ec415850a520330ba
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 4 14:13:10 2023 +0000
patch 9.0.1378: illegal memory access when using virtual editing
Problem: Illegal memory access when using virtual editing.
Solution: Make sure "startspaces" is not negative.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 04 Mar 2023 15:15:04 +0100 |
parents | dbec60b8c253 |
children | 22a08166a876 |
comparison
equal
deleted
inserted
replaced
32093:1b6ac899f079 | 32094:7d94b1c0f292 |
---|---|
82 call assert_equal('x', getline(1)) | 82 call assert_equal('x', getline(1)) |
83 " Do a visual block change | 83 " Do a visual block change |
84 call setline(1, ['a', 'b', 'c']) | 84 call setline(1, ['a', 'b', 'c']) |
85 exe "normal gg3l\<C-V>2jcx" | 85 exe "normal gg3l\<C-V>2jcx" |
86 call assert_equal(['a x', 'b x', 'c x'], getline(1, '$')) | 86 call assert_equal(['a x', 'b x', 'c x'], getline(1, '$')) |
87 bwipe! | |
88 set virtualedit= | |
89 endfunc | |
90 | |
91 func Test_edit_special_char() | |
92 new | |
93 se ve=all | |
94 norm a0 | |
95 sil! exe "norm o00000\<Nul>k<a0s" | |
96 | |
87 bwipe! | 97 bwipe! |
88 set virtualedit= | 98 set virtualedit= |
89 endfunc | 99 endfunc |
90 | 100 |
91 " Tests for pasting at the beginning, end and middle of a tab character | 101 " Tests for pasting at the beginning, end and middle of a tab character |