forked from aniani/vim
patch 8.2.5008: when 'formatoptions' contains "/" wrongly wrapping comment
Problem: When 'formatoptions' contains "/" wrongly wrapping a long trailing comment. Solution: Pass the OPENLINE_FORMAT flag.
This commit is contained in:
@@ -1643,7 +1643,8 @@ open_line(
|
||||
lead_len = get_leader_len(saved_line, &lead_flags,
|
||||
dir == BACKWARD, TRUE);
|
||||
if (lead_len == 0 && curbuf->b_p_cin && do_cindent && dir == FORWARD
|
||||
&& !has_format_option(FO_NO_OPEN_COMS))
|
||||
&& (!has_format_option(FO_NO_OPEN_COMS)
|
||||
|| (flags & OPENLINE_FORMAT)))
|
||||
{
|
||||
// Check for a line comment after code.
|
||||
comment_start = check_linecomment(saved_line);
|
||||
|
Reference in New Issue
Block a user