mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
highlight: Added QuickFixLine highlight group
- Links to Search by default screen.c: Combine CursorLine with QuickFixLine - HLF_QFL takes priority over HLF_CUL docs: Updated to mention QuickFixLine runtime: Added QuickFixLine to nvimHLGroup tests: QuickFixLine highlight
This commit is contained in:
@@ -486,6 +486,7 @@ typedef enum {
|
||||
, HLF_CUC /* 'cursurcolumn' */
|
||||
, HLF_CUL /* 'cursurline' */
|
||||
, HLF_MC /* 'colorcolumn' */
|
||||
, HLF_QFL // selected quickfix line
|
||||
, HLF_COUNT /* MUST be the last one */
|
||||
} hlf_T;
|
||||
|
||||
@@ -494,7 +495,7 @@ typedef enum {
|
||||
#define HL_FLAGS {'8', '~', 'z', 'Z', '@', 'd', 'e', 'i', 'l', 'm', 'M', 'n', \
|
||||
'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', 'f', 'F', \
|
||||
'A', 'C', 'D', 'T', '-', '>', 'B', 'P', 'R', 'L', '+', '=', \
|
||||
'x', 'X', '*', '#', '_', '!', '.', 'o'}
|
||||
'x', 'X', '*', '#', '_', '!', '.', 'o', 'q'}
|
||||
|
||||
EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
|
||||
EXTERN int highlight_user[9]; /* User[1-9] attributes */
|
||||
|
@@ -246,7 +246,7 @@ typedef struct vimoption {
|
||||
"A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal," \
|
||||
"B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel," \
|
||||
"x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill," \
|
||||
"!:CursorColumn,.:CursorLine,o:ColorColumn"
|
||||
"!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine"
|
||||
|
||||
/*
|
||||
* options[] is initialized here.
|
||||
|
@@ -1764,7 +1764,7 @@ void qf_list(exarg_T *eap)
|
||||
vim_snprintf((char *)IObuff, IOSIZE, "%2d %s",
|
||||
i, (char *)fname);
|
||||
msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index
|
||||
? hl_attr(HLF_L) : hl_attr(HLF_D));
|
||||
? hl_attr(HLF_QFL) : hl_attr(HLF_D));
|
||||
if (qfp->qf_lnum == 0)
|
||||
IObuff[0] = NUL;
|
||||
else if (qfp->qf_col == 0)
|
||||
|
@@ -2405,7 +2405,7 @@ win_line (
|
||||
|
||||
/* Highlight the current line in the quickfix window. */
|
||||
if (bt_quickfix(wp->w_buffer) && qf_current_entry(wp) == lnum)
|
||||
line_attr = hl_attr(HLF_L);
|
||||
line_attr = hl_attr(HLF_QFL);
|
||||
if (line_attr != 0)
|
||||
area_highlighting = TRUE;
|
||||
|
||||
@@ -2624,7 +2624,12 @@ win_line (
|
||||
* then. */
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum
|
||||
&& !(wp == curwin && VIsual_active)) {
|
||||
line_attr = hl_attr(HLF_CUL);
|
||||
if (line_attr != 0 && !(State & INSERT) && bt_quickfix(wp->w_buffer)
|
||||
&& qf_current_entry(wp) == lnum) {
|
||||
line_attr = hl_combine_attr(hl_attr(HLF_CUL), line_attr);
|
||||
} else {
|
||||
line_attr = hl_attr(HLF_CUL);
|
||||
}
|
||||
area_highlighting = true;
|
||||
}
|
||||
|
||||
|
@@ -5902,6 +5902,7 @@ static char *highlight_init_both[] =
|
||||
"VertSplit cterm=reverse gui=reverse",
|
||||
"WildMenu ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black",
|
||||
"default link EndOfBuffer NonText",
|
||||
"default link QuickFixLine Search",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user