1
0
forked from aniani/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.
This commit is contained in:
Bram Moolenaar
2021-12-29 14:09:32 +00:00
parent febb78fa17
commit 264d3ddac0
3 changed files with 28 additions and 2 deletions

View File

@@ -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