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

@@ -5,11 +5,12 @@
#include "nvim/pos.h" // for linenr_T
// flags for open_line()
#define OPENLINE_DELSPACES 1 // delete spaces after cursor
#define OPENLINE_DO_COM 2 // format comments
#define OPENLINE_KEEPTRAIL 4 // keep trailing spaces
#define OPENLINE_MARKFIX 8 // fix mark positions
#define OPENLINE_COM_LIST 16 // format comments with list/2nd line indent
#define OPENLINE_DELSPACES 0x01 // delete spaces after cursor
#define OPENLINE_DO_COM 0x02 // format comments
#define OPENLINE_KEEPTRAIL 0x04 // keep trailing spaces
#define OPENLINE_MARKFIX 0x08 // fix mark positions
#define OPENLINE_COM_LIST 0x10 // format comments with list/2nd line indent
#define OPENLINE_FORMAT 0x20 // formatting long comment
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "change.h.generated.h"