vim-patch:8.2.5008: when 'formatoptions' contains "/" wrongly wrapping comment (#18717)

Problem:    When 'formatoptions' contains "/" wrongly wrapping a long trailing
            comment.
Solution:   Pass the OPENLINE_FORMAT flag.
7e66778815
This commit is contained in:
zeertzjq
2022-05-23 21:27:57 +08:00
committed by GitHub
parent 4c6626f03d
commit 4b4643be07
4 changed files with 26 additions and 7 deletions

View File

@@ -6246,6 +6246,7 @@ static void internal_format(int textwidth, int second_indent, int flags, int for
open_line(FORWARD, OPENLINE_DELSPACES + OPENLINE_MARKFIX
+ (fo_white_par ? OPENLINE_KEEPTRAIL : 0)
+ (do_comments ? OPENLINE_DO_COM : 0)
+ OPENLINE_FORMAT
+ ((flags & INSCHAR_COM_LIST) ? OPENLINE_COM_LIST : 0),
((flags & INSCHAR_COM_LIST) ? second_indent : old_indent),
&did_do_comment);