aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-10-10 06:49:37 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-10-10 07:21:02 +0800
commit9612b3a9053ae2dfe5a4321a5dd0af249c281543 (patch)
tree317715f7435d6fb0e331a2a803b0f4c6a7b42052
parent8450752f46e1482bf34b7f05e484cca740f61075 (diff)
downloadrneovim-9612b3a9053ae2dfe5a4321a5dd0af249c281543.tar.gz
rneovim-9612b3a9053ae2dfe5a4321a5dd0af249c281543.tar.bz2
rneovim-9612b3a9053ae2dfe5a4321a5dd0af249c281543.zip
vim-patch:9.1.0772: some missing changes from v9.1.0771
Problem: some missing changes from v9.1.0771 Solution: use correct highlighting attribute and adjust comments (glepnir) closes: vim/vim#15836 https://github.com/vim/vim/commit/7baa014d0f73c3b2c6831471d047220633651238 Co-authored-by: glepnir <glephunter@gmail.com>
-rw-r--r--src/nvim/insexpand.c2
-rw-r--r--src/nvim/popupmenu.c13
-rw-r--r--src/nvim/popupmenu.h2
3 files changed, 9 insertions, 8 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c
index 4a73826233..2482cef7a1 100644
--- a/src/nvim/insexpand.c
+++ b/src/nvim/insexpand.c
@@ -164,7 +164,7 @@ struct compl_S {
int cp_flags; ///< CP_ values
int cp_number; ///< sequence number
int cp_score; ///< fuzzy match score
- int cp_user_abbr_hlattr; ///< highlight attribute to combine with for abbr
+ int cp_user_abbr_hlattr; ///< highlight attribute for abbr
int cp_user_kind_hlattr; ///< highlight attribute for kind
};
diff --git a/src/nvim/popupmenu.c b/src/nvim/popupmenu.c
index 3f64e841e2..ed4c9f3056 100644
--- a/src/nvim/popupmenu.c
+++ b/src/nvim/popupmenu.c
@@ -733,8 +733,7 @@ void pum_redraw(void)
}
if (attrs != NULL) {
- xfree(attrs);
- attrs = NULL;
+ XFREE_CLEAR(attrs);
}
if (*p != TAB) {
@@ -743,10 +742,10 @@ void pum_redraw(void)
// Display two spaces for a Tab.
if (pum_rl) {
- grid_line_puts(grid_col - 1, " ", 2, orig_attr);
+ grid_line_puts(grid_col - 1, " ", 2, attr);
grid_col -= 2;
} else {
- grid_line_puts(grid_col, " ", 2, orig_attr);
+ grid_line_puts(grid_col, " ", 2, attr);
grid_col += 2;
}
totwidth += 2;
@@ -777,10 +776,12 @@ void pum_redraw(void)
}
if (pum_rl) {
- grid_line_fill(col_off - basic_width - n + 1, grid_col + 1, schar_from_ascii(' '), attr);
+ grid_line_fill(col_off - basic_width - n + 1, grid_col + 1,
+ schar_from_ascii(' '), orig_attr);
grid_col = col_off - basic_width - n;
} else {
- grid_line_fill(grid_col, col_off + basic_width + n, schar_from_ascii(' '), orig_attr);
+ grid_line_fill(grid_col, col_off + basic_width + n,
+ schar_from_ascii(' '), orig_attr);
grid_col = col_off + basic_width + n;
}
totwidth = basic_width + n;
diff --git a/src/nvim/popupmenu.h b/src/nvim/popupmenu.h
index 5f02b3b9e0..40bd42ee17 100644
--- a/src/nvim/popupmenu.h
+++ b/src/nvim/popupmenu.h
@@ -16,7 +16,7 @@ typedef struct {
char *pum_info; ///< extra info
int pum_score; ///< fuzzy match score
int pum_idx; ///< index of item before sorting by score
- int pum_user_abbr_hlattr; ///< highlight attribute to combine with
+ int pum_user_abbr_hlattr; ///< highlight attribute for abbr
int pum_user_kind_hlattr; ///< highlight attribute for kind
} pumitem_T;