diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-04 21:49:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-04 21:49:43 +0800 |
| commit | 234b8c5f3d57294dda06dbc6c1760e5983bd2c19 (patch) | |
| tree | 30ee4255289a1c3be9a7a80ab06242ec91908406 /src/nvim/testdir/test_textformat.vim | |
| parent | 0aba1761714661b8576d4676c61c319e76bfac1b (diff) | |
| parent | 2aafaa59928e17fd7858a89d203e2b2a07707601 (diff) | |
| download | rneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.tar.gz rneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.tar.bz2 rneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.zip | |
Merge pull request #20934 from zeertzjq/vim-8.2.0968
vim-patch:8.2.{0968,0976,1022,1810,2901}: various tests
Diffstat (limited to 'src/nvim/testdir/test_textformat.vim')
| -rw-r--r-- | src/nvim/testdir/test_textformat.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_textformat.vim b/src/nvim/testdir/test_textformat.vim index 4eb6e69adf..3bce2eb24d 100644 --- a/src/nvim/testdir/test_textformat.vim +++ b/src/nvim/testdir/test_textformat.vim @@ -1096,6 +1096,20 @@ func Test_fo_a_w() call feedkeys("iabc abc a abc\<Esc>k0weade", 'xt') call assert_equal(['abc abcde ', 'a abc'], getline(1, '$')) + " when a line ends with space, it is not broken up. + %d + call feedkeys("ione two to ", 'xt') + call assert_equal('one two to ', getline(1)) + + " when a line ends with spaces and backspace is used in the next line, the + " last space in the previous line should be removed. + %d + set backspace=indent,eol,start + call setline(1, ['one ', 'two']) + exe "normal 2Gi\<BS>" + call assert_equal(['one two'], getline(1, '$')) + set backspace& + " Test for 'a', 'w' and '1' options. setlocal textwidth=0 setlocal fo=1aw |