]> granicus.if.org Git - vim/commitdiff
patch 8.0.0641: cannot set a separate highlighting for the quickfix line v8.0.0641
authorBram Moolenaar <Bram@vim.org>
Tue, 13 Jun 2017 15:21:04 +0000 (17:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 13 Jun 2017 15:21:04 +0000 (17:21 +0200)
Problem:    Cannot set a separate highlighting for the current line in the
            quickfix window.
Solution:   Add QuickFixLine. (anishsane, closes #1755)

runtime/doc/options.txt
runtime/doc/quickfix.txt
src/option.c
src/quickfix.c
src/screen.c
src/syntax.c
src/version.c
src/vim.h

index 25b3f1835b2f7d0de9b30e2edb857ae892c02106..b310b9fd2c50f42fadaa5cd03855c5a891020f08 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 8.0.  Last change: 2017 Jun 04
+*options.txt*  For Vim version 8.0.  Last change: 2017 Jun 13
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -3522,6 +3522,9 @@ A jump table for the options with a short description can be found at |Q_op|.
                :s///gg           subst. all      subst. one
 
        NOTE: This option is reset when 'compatible' is set.
+       DEPRECATED: Setting this option may break plugins that are not aware
+       of this option.  Also, many users get confused that adding the /g flag
+       has the opposite effect of that it normally does.
 
                                                *'grepformat'* *'gfm'*
 'grepformat' 'gfm'     string  (default "%f:%l:%m,%f:%l%m,%f  %l%m")
@@ -4037,7 +4040,9 @@ A jump table for the options with a short description can be found at |Q_op|.
                                     D:DiffDelete,T:DiffText,>:SignColumn,
                                     B:SpellBad,P:SpellCap,R:SpellRare,
                                     L:SpellLocal,-:Conceal,+:Pmenu,=:PmenuSel,
-                                    x:PmenuSbar,X:PmenuThumb")
+                                    x:PmenuSbar,X:PmenuThumb,*:TabLine,
+                                    #:TabLineSel,_:TabLineFill,!:CursorColumn,
+                                    .:CursorLine,o:ColorColumn,q:QuickFixLine")
                        global
                        {not in Vi}
        This option can be used to set highlighting mode for various
index 0ee24666a6bc9d5dade11ceaf493d95ecfba39bd..0ca52aa06311a3e891855c2051c3108b816056b5 100644 (file)
@@ -1,4 +1,4 @@
-*quickfix.txt*  For Vim version 8.0.  Last change: 2017 Mar 06
+*quickfix.txt*  For Vim version 8.0.  Last change: 2017 Jun 13
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -472,7 +472,11 @@ keep its height, ignoring 'winheight' and 'equalalways'.  You can change the
 height manually (e.g., by dragging the status line above it with the mouse).
 
 In the quickfix window, each line is one error.  The line number is equal to
-the error number.  You can use ":.cc" to jump to the error under the cursor.
+the error number.  The current entry is highlighted with the QuickFixLine
+highlighting.  You can change it to your liking, e.g.: >
+       :hi QuickFixLine ctermbg=Yellow guibg=Yellow
+
+You can use ":.cc" to jump to the error under the cursor.
 Hitting the <Enter> key or double-clicking the mouse on a line has the same
 effect.  The file containing the error is opened in the window above the
 quickfix window.  If there already is a window for that file, it is used
index f9d273479353914424b1d43b63bb983a704906ca..2a92bc5ae89f92e14feb4a2f4374175ff5fe86be 100644 (file)
@@ -476,8 +476,9 @@ struct vimoption
 /* Make the string as short as possible when compiling with few features. */
 #if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
        || defined(FEAT_WINDOWS) || defined(FEAT_CLIPBOARD) \
-       || defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) || defined(FEAT_CONCEAL)
-# define HIGHLIGHT_INIT "8:SpecialKey,~:EndOfBuffer,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,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"
+       || defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) \
+       || defined(FEAT_CONCEAL) || defined(FEAT_QUICKFIX)
+# define HIGHLIGHT_INIT "8:SpecialKey,~:EndOfBuffer,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,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,q:QuickFixLine"
 #else
 # define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
 #endif
index 8b61e10bc60bbed0cb8a2a355382968a1145a8c0..61e96ddc42b379bf8bc9576aae6847962292a63b 100644 (file)
@@ -2575,7 +2575,7 @@ 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)
index 325d9ae297964ad1d87d5d288de1827dd16a79c1..f10f70dc5e73ff2651941c2ee27b7474777bdb51 100644 (file)
@@ -3371,7 +3371,7 @@ win_line(
 # if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
     /* 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);
 # endif
     if (line_attr != 0)
        area_highlighting = TRUE;
index 225853e4eeaafc63fbed3d7749989a75f0942892..56d69c6df548b72e726feb400ebcdc98c63460b8 100644 (file)
@@ -6970,6 +6970,8 @@ static char *(highlight_init_light[]) =
 #ifdef FEAT_GUI
        "Normal gui=NONE",
 #endif
+       CENT("QuickFixLine term=reverse ctermbg=Cyan",
+            "QuickFixLine term=reverse ctermbg=Cyan guibg=Cyan"),
        NULL
     };
 
@@ -7055,6 +7057,8 @@ static char *(highlight_init_dark[]) =
        CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey",
             "Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"),
 #endif
+       CENT("QuickFixLine term=reverse ctermbg=Cyan",
+            "QuickFixLine term=reverse ctermbg=Cyan guibg=Cyan"),
 #ifdef FEAT_GUI
        "Normal gui=NONE",
 #endif
index 5d935feb6fec6b6c1aa2048a1ef695b0a95e051e..365dbc5c0dcaf0de8aa98969469b41a2977bef89 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    641,
 /**/
     640,
 /**/
index caf89d4fd6ddb8702d942e34180effe0327d888c..243f8a244b4c334a94e8e92a9d06811653912cda 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -1433,6 +1433,7 @@ typedef enum
     , HLF_CUC      /* 'cursurcolumn' */
     , HLF_CUL      /* 'cursurline' */
     , HLF_MC       /* 'colorcolumn' */
+    , HLF_QFL      /* quickfix window line currently selected */
     , HLF_COUNT            /* MUST be the last one */
 } hlf_T;
 
@@ -1442,7 +1443,7 @@ typedef enum
                  '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'}
 
 /*
  * Boolean constants