diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-23 13:10:48 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-23 13:10:48 +0100 |
commit | 7e667788150be617aeac42b0d668618ac33ab9da (patch) | |
tree | 192254db3546cae9e753acdab37b326f7cfcf693 /src/change.c | |
parent | 6d24b4ff69913270ce1e5267dd6bd8454f75e2b9 (diff) |
patch 8.2.5008: when 'formatoptions' contains "/" wrongly wrapping commentv8.2.5008
Problem: When 'formatoptions' contains "/" wrongly wrapping a long trailing
comment.
Solution: Pass the OPENLINE_FORMAT flag.
Diffstat (limited to 'src/change.c')
-rw-r--r-- | src/change.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/change.c b/src/change.c index 25a96f85c2..b653dcc1b6 100644 --- a/src/change.c +++ b/src/change.c @@ -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); |