diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-03-04 19:57:32 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-03-04 19:57:32 +0000 |
commit | 5284b23e148063648be0ff46c730ca574e3ca9fa (patch) | |
tree | ac68e9687c7415912f09db726e6ad8a670964164 /src/testdir/test_backspace_opt.vim | |
parent | c99cbf8f289bdda5d4a77d7ec415850a520330ba (diff) |
patch 9.0.1379: functions for handling options are not orderedv9.0.1379
Problem: Functions for handling options are not ordered.
Solution: Put functions in alphabetical order. (Yegappan Lakshmanan,
closes #12101)
Diffstat (limited to 'src/testdir/test_backspace_opt.vim')
-rw-r--r-- | src/testdir/test_backspace_opt.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testdir/test_backspace_opt.vim b/src/testdir/test_backspace_opt.vim index d70a6d00e4..ea28803e74 100644 --- a/src/testdir/test_backspace_opt.vim +++ b/src/testdir/test_backspace_opt.vim @@ -138,4 +138,32 @@ func Test_backspace_ctrl_u() close! endfunc +" Test for setting 'backspace' to a number value (for backward compatibility) +func Test_backspace_number_value() + new + + set backspace=0 + call setline(1, ['one two', 'three four']) + call cursor(2, 1) + exe "normal! A\<C-W>\<C-U>" + call assert_equal('three four', getline(2)) + + set backspace=1 + exe "normal! A\<CR>five\<C-W>\<C-U>\<C-W>\<C-U>" + call assert_equal(['one two', 'three four'], getline(1, '$')) + + set backspace=2 + call cursor(2, 7) + exe "normal! ihalf\<C-U>" + call assert_equal('three four', getline(2)) + + set backspace=3 + call cursor(2, 7) + exe "normal! ihalf\<C-U>" + call assert_equal('four', getline(2)) + + bw! + set backspace& +endfunc + " vim: shiftwidth=2 sts=2 expandtab |