Patch 8.0.0641
Problem: Cannot set a separate highlighting for the current line in the
quickfix window.
Solution: Add QuickFixLine. (anishsane, closes #1755)
Files: src/option.c, src/quickfix.c, src/screen.c, src/syntax.c,
src/vim.h, runtime/doc/options.txt, runtime/doc/quickfix.txt
*** ../vim-8.0.0640/src/option.c 2017-04-23 18:44:22.985227930 +0200
--- src/option.c 2017-06-13 16:43:48.626107515 +0200
***************
*** 476,483 ****
/* 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"
#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
--- 476,484 ----
/* 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) || 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
*** ../vim-8.0.0640/src/quickfix.c 2017-06-11 16:07:20.702719866 +0200
--- src/quickfix.c 2017-06-13 16:41:53.738863546 +0200
***************
*** 2575,2581 ****
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));
if (qfp->qf_lnum == 0)
IObuff[0] = NUL;
else if (qfp->qf_col == 0)
--- 2575,2581 ----
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_QFL) : HL_ATTR(HLF_D));
if (qfp->qf_lnum == 0)
IObuff[0] = NUL;
else if (qfp->qf_col == 0)
*** ../vim-8.0.0640/src/screen.c 2017-04-30 20:46:27.662554770 +0200
--- src/screen.c 2017-06-13 16:41:53.742863519 +0200
***************
*** 3371,3377 ****
# 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);
# endif
if (line_attr != 0)
area_highlighting = TRUE;
--- 3371,3377 ----
# 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_QFL);
# endif
if (line_attr != 0)
area_highlighting = TRUE;
*** ../vim-8.0.0640/src/syntax.c 2017-06-13 16:34:48.617663478 +0200
--- src/syntax.c 2017-06-13 16:41:53.742863519 +0200
***************
*** 6970,6975 ****
--- 6970,6977 ----
#ifdef FEAT_GUI
"Normal gui=NONE",
#endif
+ CENT("QuickFixLine term=reverse ctermbg=Cyan",
+ "QuickFixLine term=reverse ctermbg=Cyan guibg=Cyan"),
NULL
};
***************
*** 7055,7060 ****
--- 7057,7064 ----
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
*** ../vim-8.0.0640/src/vim.h 2017-06-05 16:01:53.913848249 +0200
--- src/vim.h 2017-06-13 16:41:53.742863519 +0200
***************
*** 1433,1438 ****
--- 1433,1439 ----
, 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,1448 ****
'n', 'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
'f', 'F', 'A', 'C', 'D', 'T', '-', '>', \
'B', 'P', 'R', 'L', \
! '+', '=', 'x', 'X', '*', '#', '_', '!', '.', 'o'}
/*
* Boolean constants
--- 1443,1449 ----
'n', 'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
'f', 'F', 'A', 'C', 'D', 'T', '-', '>', \
'B', 'P', 'R', 'L', \
! '+', '=', 'x', 'X', '*', '#', '_', '!', '.', 'o', 'q'}
/*
* Boolean constants
*** ../vim-8.0.0640/runtime/doc/options.txt 2017-03-05 17:43:10.612245634
+0100
--- runtime/doc/options.txt 2017-06-13 16:45:34.605410442 +0200
***************
*** 3962,3968 ****
D:DiffDelete,T:DiffText,>:SignColumn,
B:SpellBad,P:SpellCap,R:SpellRare,
L:SpellLocal,-:Conceal,+:Pmenu,=:PmenuSel,
! x:PmenuSbar,X:PmenuThumb")
global
{not in Vi}
This option can be used to set highlighting mode for various
--- 4040,4048 ----
D:DiffDelete,T:DiffText,>:SignColumn,
B:SpellBad,P:SpellCap,R:SpellRare,
L:SpellLocal,-:Conceal,+:Pmenu,=:PmenuSel,
! 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
*** ../vim-8.0.0640/runtime/doc/quickfix.txt 2017-03-05 17:43:10.612245634
+0100
--- runtime/doc/quickfix.txt 2017-06-13 16:48:26.040283503 +0200
***************
*** 469,475 ****
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.
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
--- 472,482 ----
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. 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
*** ../vim-8.0.0640/src/version.c 2017-06-13 16:34:48.621663451 +0200
--- src/version.c 2017-06-13 16:45:52.637291870 +0200
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 641,
/**/
--
hundred-and-one symptoms of being an internet addict:
32. You don't know what sex three of your closest friends are, because they
have neutral nicknames and you never bothered to ask.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.