[vim/vim] '}' in Comment influences C indentation (Issue #20455)

0 views
Skip to first unread message

rendcrx

unread,
9:25 AM (13 hours ago) 9:25 AM
to vim/vim, Subscribed
rendcrx created an issue (vim/vim#20455)

Steps to reproduce

typedef enum {
	ND_BLOCK,  // { ... }
	ND_FUNCALL,
} NodeKind;

After using set shiftwidth=4 and gg=G:

typedef enum {
    ND_BLOCK,  // { ... }
	ND_FUNCALL,
} NodeKind;

Expected behaviour

If I remove '}':

typedef enum {
    ND_BLOCK,  // { ...
    ND_FUNCALL,
} NodeKind;

Comment should not affect indentation of next line

Similar: #19578

Version of Vim

9.2.600

Environment

Darwin
kitty
xterm-kitty
zsh

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20455@github.com>

Reply all
Reply to author
Forward
0 new messages