From ab5c15610f501a1d8b842fc3e75b053491eb45d7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 9 May 2025 06:42:40 +0800 Subject: [PATCH] vim-patch:partial:9.1.1371: style: indentation and brace issues in insexpand.c Problem: style: indentation issue in insexpand.c Solution: update style (glepnir) closes: vim/vim#17278 https://github.com/vim/vim/commit/19e1dd6b6aeb96d64122332a8c3d17b9d5ca007b Co-authored-by: glepnir --- src/nvim/insexpand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 36aaa9de72..6c7bda843c 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -984,9 +984,7 @@ static int ins_compl_add(char *const str, int len, char *const fname, char *cons match->cp_user_kind_hlattr = user_hl ? user_hl[1] : -1; if (cptext != NULL) { - int i; - - for (i = 0; i < CPT_COUNT; i++) { + for (int i = 0; i < CPT_COUNT; i++) { if (cptext[i] == NULL) { continue; } @@ -4834,6 +4832,7 @@ static int get_normal_compl_info(char *line, int startcol, colnr_T curs_col) } startcol -= head_off; } + compl_col += ++startcol; compl_length = (int)curs_col - startcol; if (compl_length == 1) { @@ -4972,6 +4971,7 @@ static int get_userdefined_compl_info(colnr_T curs_col) if (col == -2 || aborting()) { return FAIL; } + // Return value -3 does the same as -2 and leaves CTRL-X mode. if (col == -3) { ctrl_x_mode = CTRL_X_NORMAL;