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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user