vim-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.
6e371ecb27
This commit is contained in:
zeertzjq
2022-01-31 15:44:54 +08:00
parent ef5cd99df0
commit eda957db10
7 changed files with 95 additions and 22 deletions

View File

@@ -2318,7 +2318,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel)
* Return MAXCOL if not, otherwise return the column.
* TODO: skip strings.
*/
static int check_linecomment(const char_u *line)
int check_linecomment(const char_u *line)
{
const char_u *p = line; // scan from start
// skip Lispish one-line comments