diff options
Diffstat (limited to 'src/nvim/testdir/test_textformat.vim')
-rw-r--r-- | src/nvim/testdir/test_textformat.vim | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_textformat.vim b/src/nvim/testdir/test_textformat.vim index 5cebdef7f1..e1d155eba7 100644 --- a/src/nvim/testdir/test_textformat.vim +++ b/src/nvim/testdir/test_textformat.vim @@ -238,7 +238,7 @@ func Test_format_c_comment() END call assert_equal(expected, getline(1, '$')) - " Using "o" repeates the line comment, "O" does not. + " Using "o" repeats the line comment, "O" does not. %del let text =<< trim END nop; @@ -261,6 +261,21 @@ func Test_format_c_comment() END call assert_equal(expected, getline(1, '$')) + " Using CTRL-U after "o" fixes the indent + %del + let text =<< trim END + { + val = val; // This is a comment + END + call setline(1, text) + exe "normal! 2Go\<C-U>x\<Esc>" + let expected =<< trim END + { + val = val; // This is a comment + x + END + call assert_equal(expected, getline(1, '$')) + bwipe! endfunc |