diff options
Diffstat (limited to 'src/nvim/testdir/test_textformat.vim')
-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 b6be3d8861..714539d418 100644 --- a/src/nvim/testdir/test_textformat.vim +++ b/src/nvim/testdir/test_textformat.vim @@ -278,6 +278,18 @@ func Test_format_c_comment() // END call assert_equal(expected, getline(1, '$')) + 3delete + + " No comment repeated with a slash in 'formatoptions' + set fo+=/ + normal 2Gox + let expected =<< trim END + nop; + val = val; // This is a comment + x + END + call assert_equal(expected, getline(1, '$')) + set fo-=/ " using 'indentexpr' instead of 'cindent' does not repeat a comment setl nocindent indentexpr=2 |