From 4b4643be07e4e9259b3cb05e511e5047778733c1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 23 May 2022 21:27:57 +0800 Subject: 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 --- src/nvim/edit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/edit.c') 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); -- cgit