0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.3787: no proper formatting of a C line comment after a statement

Problem:    No proper formatting of a C line comment after a statement.
Solution:   Find the start of the line comment, insert the comment leader and
            indent the comment properly.
This commit is contained in:
Bram Moolenaar
2021-12-12 14:16:39 +00:00
parent 9a4ec5a626
commit 6e371ecb27
11 changed files with 118 additions and 24 deletions

View File

@@ -6511,7 +6511,7 @@ n_opencmd(cmdarg_T *cap)
) == OK
&& open_line(cap->cmdchar == 'O' ? BACKWARD : FORWARD,
has_format_option(FO_OPEN_COMS) ? OPENLINE_DO_COM : 0,
0) == OK)
0, NULL) == OK)
{
#ifdef FEAT_CONCEAL
if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)