diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-23 21:27:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 21:27:57 +0800 |
commit | 4b4643be07e4e9259b3cb05e511e5047778733c1 (patch) | |
tree | b840362430fd1d5a82768bbddc459c67992b26e3 /src/nvim/edit.c | |
parent | 4c6626f03dc645a426c1e63ca372b96f1073581b (diff) | |
download | rneovim-4b4643be07e4e9259b3cb05e511e5047778733c1.tar.gz rneovim-4b4643be07e4e9259b3cb05e511e5047778733c1.tar.bz2 rneovim-4b4643be07e4e9259b3cb05e511e5047778733c1.zip |
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.
https://github.com/vim/vim/commit/7e667788150be617aeac42b0d668618ac33ab9da
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 1cc60f9953..568a8573db 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -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); |