diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-20 17:01:31 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-20 17:03:36 -0500 |
commit | 06869a6940ea6943ba5e652d08e3062626fe47e9 (patch) | |
tree | 7f02d0460a82233a1bb7e739a2f0593b4f0a7bbd /src/nvim/testdir | |
parent | 0476f049f4f259cf172e0390f4dc655209ea0c34 (diff) | |
download | rneovim-06869a6940ea6943ba5e652d08e3062626fe47e9.tar.gz rneovim-06869a6940ea6943ba5e652d08e3062626fe47e9.tar.bz2 rneovim-06869a6940ea6943ba5e652d08e3062626fe47e9.zip |
vim-patch:8.2.2166: auto format doesn't work when deleting text
Problem: Auto format doesn't work when deleting text.
Solution: Make "x" trigger auto format. (closes vim/vim#7504)
https://github.com/vim/vim/commit/d0a1dee3f197d41434df4cf0271066b6aeb690fc
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_textformat.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_textformat.vim b/src/nvim/testdir/test_textformat.vim index 64b873c3c3..4af52b536c 100644 --- a/src/nvim/testdir/test_textformat.vim +++ b/src/nvim/testdir/test_textformat.vim @@ -957,6 +957,18 @@ func Test_fo_a_w() call assert_equal('g uu uu ', getline(1)[-8:]) call assert_equal(['uu. foo'], getline(2, '$')) + " using backspace or "x" triggers reformat + call setline(1, ['1 2 3 4 5 ', '6 7 8 9']) + set tw=10 + set fo=taw + set bs=indent,eol,start + exe "normal 1G4la\<BS>\<BS>\<Esc>" + call assert_equal(['1 2 4 5 6 ', '7 8 9'], getline(1, 2)) + exe "normal f4xx" + call assert_equal(['1 2 5 6 7 ', '8 9'], getline(1, 2)) + + set tw=0 + set fo& %bw! endfunc |