diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-01-31 15:44:54 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-01-31 15:44:54 +0800 |
commit | 88ba0774e202126a432521d5cb14bd2187ef65a2 (patch) | |
tree | eca5f0142ffb0b0318a9d9087dbaad6195884c02 /src/nvim/testdir | |
parent | eda957db10e97b28a2734e0391d986676927d963 (diff) | |
download | rneovim-88ba0774e202126a432521d5cb14bd2187ef65a2.tar.gz rneovim-88ba0774e202126a432521d5cb14bd2187ef65a2.tar.bz2 rneovim-88ba0774e202126a432521d5cb14bd2187ef65a2.zip |
vim-patch:8.2.3932: C line comment not formatted properly
Problem: C line comment not formatted properly.
Solution: If a line comment follows after "#if" the next line is not the end
of a paragraph.
https://github.com/vim/vim/commit/264d3ddac0f9474816c20a0e92014d6f7f4b08ac
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_textformat.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_textformat.vim b/src/nvim/testdir/test_textformat.vim index 5ca2554218..25ae208f03 100644 --- a/src/nvim/testdir/test_textformat.vim +++ b/src/nvim/testdir/test_textformat.vim @@ -223,6 +223,21 @@ func Test_format_c_comment() END call assert_equal(expected, getline(1, '$')) + %del + let text =<< trim END + #if 0 // This is another long end of + // line comment that + // wraps. + END + call setline(1, text) + normal gq2j + let expected =<< trim END + #if 0 // This is another long + // end of line comment + // that wraps. + END + call assert_equal(expected, getline(1, '$')) + bwipe! endfunc |