Open whonore opened 4 years ago
We already do ensure there's a space. Do you have b:commentary_format
set?
No, b:commentary_format
is unset, commentstring=(*%s*)
, comments=sr:(*,mb:*,ex:*)
. Commenting the second line by itself adds a space, but any range including the (**)
line does not.
Given an ML-like language with
commentstring=(*%s*)
, taking the valid program:and selecting it all and commenting with
gc
gives:The
(*)
on the second line is then treated as an unmatched open comment.The cause of this bug is probably the same as in some past issues (#3, #29, #40, etc), but the fix might be simpler here since you'd just need to ensure that there's always a space between the last character in a line and the closing comment.