diff options
| author | Tommy Allen <tommy@esdf.io> | 2016-08-03 16:56:05 -0400 | 
|---|---|---|
| committer | Tommy Allen <tommy@esdf.io> | 2016-08-17 17:48:15 -0400 | 
| commit | 605e74327a406682f317d07e0097690fc1e577cb (patch) | |
| tree | cdc6c3f9ca936c15f6709925f4498baafcce9190 /src | |
| parent | dfb6a5133b92ffb38bfb7201e91f3de328652558 (diff) | |
| download | rneovim-605e74327a406682f317d07e0097690fc1e577cb.tar.gz rneovim-605e74327a406682f317d07e0097690fc1e577cb.tar.bz2 rneovim-605e74327a406682f317d07e0097690fc1e577cb.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/globals.h | 3 | ||||
| -rw-r--r-- | src/nvim/option.c | 2 | ||||
| -rw-r--r-- | src/nvim/quickfix.c | 2 | ||||
| -rw-r--r-- | src/nvim/screen.c | 9 | ||||
| -rw-r--r-- | src/nvim/syntax.c | 1 | 
5 files changed, 12 insertions, 5 deletions
| diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 950ceb4c74..9c32075d40 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -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 */ diff --git a/src/nvim/option.c b/src/nvim/option.c index 658e0d8a47..e53dbfc75a 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -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. diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index dfd795b0ba..ba2d795eef 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -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) diff --git a/src/nvim/screen.c b/src/nvim/screen.c index d67142822f..fa8318d83e 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -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;    } diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 3215f7ea14..f7a8e4f8b9 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -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  }; | 
