This commit is contained in:
Tommy Allen 2016-08-03 17:24:26 -04:00
parent 605e74327a
commit 8d8af65659
3 changed files with 67 additions and 62 deletions

View File

@ -442,60 +442,60 @@ EXTERN int no_check_timestamps INIT(= 0); /* Don't check timestamps */
typedef enum { typedef enum {
HLF_8 = 0 /* Meta & special keys listed with ":map", text that is HLF_8 = 0 /* Meta & special keys listed with ":map", text that is
displayed different from what it is */ displayed different from what it is */
, HLF_EOB //< after the last line in the buffer , HLF_EOB // after the last line in the buffer
, HLF_TERM //< terminal cursor focused , HLF_TERM // terminal cursor focused
, HLF_TERMNC //< terminal cursor unfocused , HLF_TERMNC // terminal cursor unfocused
, HLF_AT /* @ characters at end of screen, characters that , HLF_AT // @ characters at end of screen, characters that
don't really exist in the text */ // don't really exist in the text
, HLF_D /* directories in CTRL-D listing */ , HLF_D // directories in CTRL-D listing
, HLF_E /* error messages */ , HLF_E // error messages
, HLF_I /* incremental search */ , HLF_I // incremental search
, HLF_L /* last search string */ , HLF_L // last search string
, HLF_M /* "--More--" message */ , HLF_M // "--More--" message
, HLF_CM /* Mode (e.g., "-- INSERT --") */ , HLF_CM // Mode (e.g., "-- INSERT --")
, HLF_N /* line number for ":number" and ":#" commands */ , HLF_N // line number for ":number" and ":#" commands
, HLF_CLN /* current line number */ , HLF_CLN // current line number
, HLF_R /* return to continue message and yes/no questions */ , HLF_R // return to continue message and yes/no questions
, HLF_S /* status lines */ , HLF_S // status lines
, HLF_SNC /* status lines of not-current windows */ , HLF_SNC // status lines of not-current windows
, HLF_C /* column to separate vertically split windows */ , HLF_C // column to separate vertically split windows
, HLF_T /* Titles for output from ":set all", ":autocmd" etc. */ , HLF_T // Titles for output from ":set all", ":autocmd" etc.
, HLF_V /* Visual mode */ , HLF_V // Visual mode
, HLF_VNC /* Visual mode, autoselecting and not clipboard owner */ , HLF_VNC // Visual mode, autoselecting and not clipboard owner
, HLF_W /* warning messages */ , HLF_W // warning messages
, HLF_WM /* Wildmenu highlight */ , HLF_WM // Wildmenu highlight
, HLF_FL /* Folded line */ , HLF_FL // Folded line
, HLF_FC /* Fold column */ , HLF_FC // Fold column
, HLF_ADD /* Added diff line */ , HLF_ADD // Added diff line
, HLF_CHD /* Changed diff line */ , HLF_CHD // Changed diff line
, HLF_DED /* Deleted diff line */ , HLF_DED // Deleted diff line
, HLF_TXD /* Text Changed in diff line */ , HLF_TXD // Text Changed in diff line
, HLF_CONCEAL /* Concealed text */ , HLF_CONCEAL // Concealed text
, HLF_SC /* Sign column */ , HLF_SC // Sign column
, HLF_SPB /* SpellBad */ , HLF_SPB // SpellBad
, HLF_SPC /* SpellCap */ , HLF_SPC // SpellCap
, HLF_SPR /* SpellRare */ , HLF_SPR // SpellRare
, HLF_SPL /* SpellLocal */ , HLF_SPL // SpellLocal
, HLF_PNI /* popup menu normal item */ , HLF_PNI // popup menu normal item
, HLF_PSI /* popup menu selected item */ , HLF_PSI // popup menu selected item
, HLF_PSB /* popup menu scrollbar */ , HLF_PSB // popup menu scrollbar
, HLF_PST /* popup menu scrollbar thumb */ , HLF_PST // popup menu scrollbar thumb
, HLF_TP /* tabpage line */ , HLF_TP // tabpage line
, HLF_TPS /* tabpage line selected */ , HLF_TPS // tabpage line selected
, HLF_TPF /* tabpage line filler */ , HLF_TPF // tabpage line filler
, HLF_CUC /* 'cursurcolumn' */ , HLF_CUC // 'cursurcolumn'
, HLF_CUL /* 'cursurline' */ , HLF_CUL // 'cursurline'
, HLF_MC /* 'colorcolumn' */ , HLF_MC // 'colorcolumn'
, HLF_QFL // selected quickfix line , HLF_QFL // selected quickfix line
, HLF_COUNT /* MUST be the last one */ , HLF_COUNT // MUST be the last one
} hlf_T; } hlf_T;
/* The HL_FLAGS must be in the same order as the HLF_ enums! /* The HL_FLAGS must be in the same order as the HLF_ enums!
* When changing this also adjust the default for 'highlight'. */ * When changing this also adjust the default for 'highlight'. */
#define HL_FLAGS {'8', '~', 'z', 'Z', '@', 'd', 'e', 'i', 'l', 'm', 'M', 'n', \ #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', \ 'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', 'f', 'F', \
'A', 'C', 'D', 'T', '-', '>', 'B', 'P', 'R', 'L', '+', '=', \ 'A', 'C', 'D', 'T', '-', '>', 'B', 'P', 'R', 'L', '+', '=', \
'x', 'X', '*', '#', '_', '!', '.', 'o', 'q'} 'x', 'X', '*', '#', '_', '!', '.', 'o', 'q' }
EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */ EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
EXTERN int highlight_user[9]; /* User[1-9] attributes */ EXTERN int highlight_user[9]; /* User[1-9] attributes */

View File

@ -1764,16 +1764,18 @@ void qf_list(exarg_T *eap)
vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", vim_snprintf((char *)IObuff, IOSIZE, "%2d %s",
i, (char *)fname); i, (char *)fname);
msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index
? hl_attr(HLF_QFL) : hl_attr(HLF_D)); ? hl_attr(HLF_QFL) : hl_attr(HLF_D));
if (qfp->qf_lnum == 0) if (qfp->qf_lnum == 0) {
IObuff[0] = NUL; IObuff[0] = NUL;
else if (qfp->qf_col == 0) } else if (qfp->qf_col == 0) {
sprintf((char *)IObuff, ":%" PRId64, (int64_t)qfp->qf_lnum); vim_snprintf((char *)IObuff, IOSIZE, ":%" PRId64,
else (int64_t)qfp->qf_lnum);
sprintf((char *)IObuff, ":%" PRId64 " col %d", } else {
(int64_t)qfp->qf_lnum, qfp->qf_col); vim_snprintf((char *)IObuff, IOSIZE, ":%" PRId64 " col %d",
sprintf((char *)IObuff + STRLEN(IObuff), "%s:", (int64_t)qfp->qf_lnum, qfp->qf_col);
(char *)qf_types(qfp->qf_type, qfp->qf_nr)); }
vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE, "%s:",
(char *)qf_types(qfp->qf_type, qfp->qf_nr));
msg_puts_attr(IObuff, hl_attr(HLF_N)); msg_puts_attr(IObuff, hl_attr(HLF_N));
if (qfp->qf_pattern != NULL) { if (qfp->qf_pattern != NULL) {
qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE); qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE);

View File

@ -2403,11 +2403,14 @@ win_line (
if (v != 0) if (v != 0)
line_attr = sign_get_attr((int)v, TRUE); line_attr = sign_get_attr((int)v, TRUE);
/* Highlight the current line in the quickfix window. */ // Highlight the current line in the quickfix window.
if (bt_quickfix(wp->w_buffer) && qf_current_entry(wp) == lnum) if (bt_quickfix(wp->w_buffer) && qf_current_entry(wp) == lnum) {
line_attr = hl_attr(HLF_QFL); line_attr = hl_attr(HLF_QFL);
if (line_attr != 0) }
area_highlighting = TRUE;
if (line_attr != 0) {
area_highlighting = true;
}
line = ml_get_buf(wp->w_buffer, lnum, FALSE); line = ml_get_buf(wp->w_buffer, lnum, FALSE);
ptr = line; ptr = line;