mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Linting
This commit is contained in:
parent
605e74327a
commit
8d8af65659
@ -442,52 +442,52 @@ EXTERN int no_check_timestamps INIT(= 0); /* Don't check timestamps */
|
||||
typedef enum {
|
||||
HLF_8 = 0 /* Meta & special keys listed with ":map", text that is
|
||||
displayed different from what it is */
|
||||
, HLF_EOB //< after the last line in the buffer
|
||||
, HLF_TERM //< terminal cursor focused
|
||||
, HLF_TERMNC //< terminal cursor unfocused
|
||||
, HLF_AT /* @ characters at end of screen, characters that
|
||||
don't really exist in the text */
|
||||
, HLF_D /* directories in CTRL-D listing */
|
||||
, HLF_E /* error messages */
|
||||
, HLF_I /* incremental search */
|
||||
, HLF_L /* last search string */
|
||||
, HLF_M /* "--More--" message */
|
||||
, HLF_CM /* Mode (e.g., "-- INSERT --") */
|
||||
, HLF_N /* line number for ":number" and ":#" commands */
|
||||
, HLF_CLN /* current line number */
|
||||
, HLF_R /* return to continue message and yes/no questions */
|
||||
, HLF_S /* status lines */
|
||||
, HLF_SNC /* status lines of not-current windows */
|
||||
, HLF_C /* column to separate vertically split windows */
|
||||
, HLF_T /* Titles for output from ":set all", ":autocmd" etc. */
|
||||
, HLF_V /* Visual mode */
|
||||
, HLF_VNC /* Visual mode, autoselecting and not clipboard owner */
|
||||
, HLF_W /* warning messages */
|
||||
, HLF_WM /* Wildmenu highlight */
|
||||
, HLF_FL /* Folded line */
|
||||
, HLF_FC /* Fold column */
|
||||
, HLF_ADD /* Added diff line */
|
||||
, HLF_CHD /* Changed diff line */
|
||||
, HLF_DED /* Deleted diff line */
|
||||
, HLF_TXD /* Text Changed in diff line */
|
||||
, HLF_CONCEAL /* Concealed text */
|
||||
, HLF_SC /* Sign column */
|
||||
, HLF_SPB /* SpellBad */
|
||||
, HLF_SPC /* SpellCap */
|
||||
, HLF_SPR /* SpellRare */
|
||||
, HLF_SPL /* SpellLocal */
|
||||
, HLF_PNI /* popup menu normal item */
|
||||
, HLF_PSI /* popup menu selected item */
|
||||
, HLF_PSB /* popup menu scrollbar */
|
||||
, HLF_PST /* popup menu scrollbar thumb */
|
||||
, HLF_TP /* tabpage line */
|
||||
, HLF_TPS /* tabpage line selected */
|
||||
, HLF_TPF /* tabpage line filler */
|
||||
, HLF_CUC /* 'cursurcolumn' */
|
||||
, HLF_CUL /* 'cursurline' */
|
||||
, HLF_MC /* 'colorcolumn' */
|
||||
, HLF_EOB // after the last line in the buffer
|
||||
, HLF_TERM // terminal cursor focused
|
||||
, HLF_TERMNC // terminal cursor unfocused
|
||||
, HLF_AT // @ characters at end of screen, characters that
|
||||
// don't really exist in the text
|
||||
, HLF_D // directories in CTRL-D listing
|
||||
, HLF_E // error messages
|
||||
, HLF_I // incremental search
|
||||
, HLF_L // last search string
|
||||
, HLF_M // "--More--" message
|
||||
, HLF_CM // Mode (e.g., "-- INSERT --")
|
||||
, HLF_N // line number for ":number" and ":#" commands
|
||||
, HLF_CLN // current line number
|
||||
, HLF_R // return to continue message and yes/no questions
|
||||
, HLF_S // status lines
|
||||
, HLF_SNC // status lines of not-current windows
|
||||
, HLF_C // column to separate vertically split windows
|
||||
, HLF_T // Titles for output from ":set all", ":autocmd" etc.
|
||||
, HLF_V // Visual mode
|
||||
, HLF_VNC // Visual mode, autoselecting and not clipboard owner
|
||||
, HLF_W // warning messages
|
||||
, HLF_WM // Wildmenu highlight
|
||||
, HLF_FL // Folded line
|
||||
, HLF_FC // Fold column
|
||||
, HLF_ADD // Added diff line
|
||||
, HLF_CHD // Changed diff line
|
||||
, HLF_DED // Deleted diff line
|
||||
, HLF_TXD // Text Changed in diff line
|
||||
, HLF_CONCEAL // Concealed text
|
||||
, HLF_SC // Sign column
|
||||
, HLF_SPB // SpellBad
|
||||
, HLF_SPC // SpellCap
|
||||
, HLF_SPR // SpellRare
|
||||
, HLF_SPL // SpellLocal
|
||||
, HLF_PNI // popup menu normal item
|
||||
, HLF_PSI // popup menu selected item
|
||||
, HLF_PSB // popup menu scrollbar
|
||||
, HLF_PST // popup menu scrollbar thumb
|
||||
, HLF_TP // tabpage line
|
||||
, HLF_TPS // tabpage line selected
|
||||
, HLF_TPF // tabpage line filler
|
||||
, HLF_CUC // 'cursurcolumn'
|
||||
, HLF_CUL // 'cursurline'
|
||||
, HLF_MC // 'colorcolumn'
|
||||
, HLF_QFL // selected quickfix line
|
||||
, HLF_COUNT /* MUST be the last one */
|
||||
, HLF_COUNT // MUST be the last one
|
||||
} hlf_T;
|
||||
|
||||
/* The HL_FLAGS must be in the same order as the HLF_ enums!
|
||||
|
@ -1765,14 +1765,16 @@ void qf_list(exarg_T *eap)
|
||||
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)
|
||||
if (qfp->qf_lnum == 0) {
|
||||
IObuff[0] = NUL;
|
||||
else if (qfp->qf_col == 0)
|
||||
sprintf((char *)IObuff, ":%" PRId64, (int64_t)qfp->qf_lnum);
|
||||
else
|
||||
sprintf((char *)IObuff, ":%" PRId64 " col %d",
|
||||
} else if (qfp->qf_col == 0) {
|
||||
vim_snprintf((char *)IObuff, IOSIZE, ":%" PRId64,
|
||||
(int64_t)qfp->qf_lnum);
|
||||
} else {
|
||||
vim_snprintf((char *)IObuff, IOSIZE, ":%" PRId64 " col %d",
|
||||
(int64_t)qfp->qf_lnum, qfp->qf_col);
|
||||
sprintf((char *)IObuff + STRLEN(IObuff), "%s:",
|
||||
}
|
||||
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));
|
||||
if (qfp->qf_pattern != NULL) {
|
||||
|
@ -2403,11 +2403,14 @@ win_line (
|
||||
if (v != 0)
|
||||
line_attr = sign_get_attr((int)v, TRUE);
|
||||
|
||||
/* Highlight the current line in the quickfix window. */
|
||||
if (bt_quickfix(wp->w_buffer) && qf_current_entry(wp) == lnum)
|
||||
// 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);
|
||||
if (line_attr != 0)
|
||||
area_highlighting = TRUE;
|
||||
}
|
||||
|
||||
if (line_attr != 0) {
|
||||
area_highlighting = true;
|
||||
}
|
||||
|
||||
line = ml_get_buf(wp->w_buffer, lnum, FALSE);
|
||||
ptr = line;
|
||||
|
Loading…
Reference in New Issue
Block a user