mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 8.0.0466: still macros that should be all-caps
Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps.
This commit is contained in:
parent
40ebc0afda
commit
8820b48654
@ -6021,7 +6021,7 @@ sign_list_placed(buf_T *rbuf)
|
||||
if (buf->b_signlist != NULL)
|
||||
{
|
||||
vim_snprintf(lbuf, BUFSIZ, _("Signs for %s:"), buf->b_fname);
|
||||
MSG_PUTS_ATTR(lbuf, hl_attr(HLF_D));
|
||||
MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D));
|
||||
msg_putchar('\n');
|
||||
}
|
||||
for (p = buf->b_signlist; p != NULL && !got_int; p = p->next)
|
||||
|
12
src/edit.c
12
src/edit.c
@ -1771,7 +1771,7 @@ edit_putchar(int c, int highlight)
|
||||
update_topline(); /* just in case w_topline isn't valid */
|
||||
validate_cursor();
|
||||
if (highlight)
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
else
|
||||
attr = 0;
|
||||
pc_row = W_WINROW(curwin) + curwin->w_wrow;
|
||||
@ -2256,7 +2256,7 @@ has_compl_option(int dict_opt)
|
||||
edit_submode = NULL;
|
||||
msg_attr(dict_opt ? (char_u *)_("'dictionary' option is empty")
|
||||
: (char_u *)_("'thesaurus' option is empty"),
|
||||
hl_attr(HLF_E));
|
||||
HL_ATTR(HLF_E));
|
||||
if (emsg_silent == 0)
|
||||
{
|
||||
vim_beep(BO_COMPL);
|
||||
@ -3252,7 +3252,7 @@ ins_compl_files(
|
||||
{
|
||||
vim_snprintf((char *)IObuff, IOSIZE,
|
||||
_("Scanning dictionary: %s"), (char *)files[i]);
|
||||
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
||||
(void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
|
||||
}
|
||||
|
||||
if (fp != NULL)
|
||||
@ -4344,7 +4344,7 @@ ins_compl_get_exp(pos_T *ini)
|
||||
: ins_buf->b_sfname == NULL
|
||||
? ins_buf->b_fname
|
||||
: ins_buf->b_sfname);
|
||||
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
||||
(void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
|
||||
}
|
||||
else if (*e_cpt == NUL)
|
||||
break;
|
||||
@ -4374,7 +4374,7 @@ ins_compl_get_exp(pos_T *ini)
|
||||
{
|
||||
type = CTRL_X_TAGS;
|
||||
vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
|
||||
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
||||
(void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
|
||||
}
|
||||
else
|
||||
type = -1;
|
||||
@ -5693,7 +5693,7 @@ ins_complete(int c, int enable_pum)
|
||||
if (!p_smd)
|
||||
msg_attr(edit_submode_extra,
|
||||
edit_submode_highl < HLF_COUNT
|
||||
? hl_attr(edit_submode_highl) : 0);
|
||||
? HL_ATTR(edit_submode_highl) : 0);
|
||||
}
|
||||
else
|
||||
msg_clr_cmdline(); /* necessary for "noshowmode" */
|
||||
|
@ -2889,7 +2889,7 @@ print_line_no_prefix(
|
||||
{
|
||||
vim_snprintf((char *)numbuf, sizeof(numbuf),
|
||||
"%*ld ", number_width(curwin), (long)lnum);
|
||||
msg_puts_attr(numbuf, hl_attr(HLF_N)); /* Highlight line nrs */
|
||||
msg_puts_attr(numbuf, HL_ATTR(HLF_N)); /* Highlight line nrs */
|
||||
}
|
||||
msg_prt_line(ml_get(lnum), list);
|
||||
}
|
||||
@ -5379,7 +5379,7 @@ do_sub(exarg_T *eap)
|
||||
msg_no_more = TRUE;
|
||||
/* write message same highlighting as for
|
||||
* wait_return */
|
||||
smsg_attr(hl_attr(HLF_R),
|
||||
smsg_attr(HL_ATTR(HLF_R),
|
||||
(char_u *)_("replace with %s (y/n/a/q/l/^E/^Y)?"), sub);
|
||||
msg_no_more = FALSE;
|
||||
msg_scroll = i;
|
||||
@ -8284,7 +8284,7 @@ ex_smile(exarg_T *eap UNUSED)
|
||||
else
|
||||
for (n = *p++; n > 0; --n)
|
||||
if (*p == 'o' || *p == '$')
|
||||
msg_putchar_attr(*p, hl_attr(HLF_L));
|
||||
msg_putchar_attr(*p, HL_ATTR(HLF_L));
|
||||
else
|
||||
msg_putchar(*p);
|
||||
msg_clr_eos();
|
||||
|
@ -2230,7 +2230,7 @@ buf_write_all(buf_T *buf, int forceit)
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (curbuf != old_curbuf)
|
||||
{
|
||||
msg_source(hl_attr(HLF_W));
|
||||
msg_source(HL_ATTR(HLF_W));
|
||||
MSG(_("Warning: Entered other buffer unexpectedly (check autocommands)"));
|
||||
}
|
||||
#endif
|
||||
@ -4733,7 +4733,7 @@ get_one_sourceline(struct source_cookie *sp)
|
||||
{
|
||||
if (!sp->error)
|
||||
{
|
||||
msg_source(hl_attr(HLF_W));
|
||||
msg_source(HL_ATTR(HLF_W));
|
||||
EMSG(_("W15: Warning: Wrong line separator, ^M may be missing"));
|
||||
}
|
||||
sp->error = TRUE;
|
||||
|
@ -6032,7 +6032,7 @@ uc_list(char_u *name, size_t name_len)
|
||||
msg_putchar(gap != &ucmds ? 'b' : ' ');
|
||||
msg_putchar(' ');
|
||||
|
||||
msg_outtrans_attr(cmd->uc_name, hl_attr(HLF_D));
|
||||
msg_outtrans_attr(cmd->uc_name, HL_ATTR(HLF_D));
|
||||
len = (int)STRLEN(cmd->uc_name) + 4;
|
||||
|
||||
do {
|
||||
@ -8480,7 +8480,7 @@ ex_tabs(exarg_T *eap UNUSED)
|
||||
{
|
||||
msg_putchar('\n');
|
||||
vim_snprintf((char *)IObuff, IOSIZE, _("Tab page %d"), tabcount++);
|
||||
msg_outtrans_attr(IObuff, hl_attr(HLF_T));
|
||||
msg_outtrans_attr(IObuff, HL_ATTR(HLF_T));
|
||||
out_flush(); /* output one line at a time */
|
||||
ui_breakcheck();
|
||||
|
||||
|
@ -4178,14 +4178,14 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
|
||||
lines = (num_files + columns - 1) / columns;
|
||||
}
|
||||
|
||||
attr = hl_attr(HLF_D); /* find out highlighting for directories */
|
||||
attr = HL_ATTR(HLF_D); /* find out highlighting for directories */
|
||||
|
||||
if (xp->xp_context == EXPAND_TAGS_LISTFILES)
|
||||
{
|
||||
MSG_PUTS_ATTR(_("tagname"), hl_attr(HLF_T));
|
||||
MSG_PUTS_ATTR(_("tagname"), HL_ATTR(HLF_T));
|
||||
msg_clr_eos();
|
||||
msg_advance(maxlen - 3);
|
||||
MSG_PUTS_ATTR(_(" kind file\n"), hl_attr(HLF_T));
|
||||
MSG_PUTS_ATTR(_(" kind file\n"), HL_ATTR(HLF_T));
|
||||
}
|
||||
|
||||
/* list the files line by line */
|
||||
@ -4196,12 +4196,12 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
|
||||
{
|
||||
if (xp->xp_context == EXPAND_TAGS_LISTFILES)
|
||||
{
|
||||
msg_outtrans_attr(files_found[k], hl_attr(HLF_D));
|
||||
msg_outtrans_attr(files_found[k], HL_ATTR(HLF_D));
|
||||
p = files_found[k] + STRLEN(files_found[k]) + 1;
|
||||
msg_advance(maxlen + 1);
|
||||
msg_puts(p);
|
||||
msg_advance(maxlen + 3);
|
||||
msg_puts_long_attr(p + 2, hl_attr(HLF_D));
|
||||
msg_puts_long_attr(p + 2, HL_ATTR(HLF_D));
|
||||
break;
|
||||
}
|
||||
for (j = maxlen - lastlen; --j >= 0; )
|
||||
|
@ -1719,7 +1719,7 @@ conv_to_pvim(void)
|
||||
|
||||
/* Assume the screen has been messed up: clear it and redraw. */
|
||||
redraw_later(CLEAR);
|
||||
MSG_ATTR(farsi_text_1, hl_attr(HLF_S));
|
||||
MSG_ATTR(farsi_text_1, HL_ATTR(HLF_S));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1747,7 +1747,7 @@ conv_to_pstd(void)
|
||||
|
||||
/* Assume the screen has been messed up: clear it and redraw. */
|
||||
redraw_later(CLEAR);
|
||||
MSG_ATTR(farsi_text_2, hl_attr(HLF_S));
|
||||
MSG_ATTR(farsi_text_2, HL_ATTR(HLF_S));
|
||||
}
|
||||
|
||||
/*
|
||||
|
14
src/fileio.c
14
src/fileio.c
@ -5044,7 +5044,7 @@ nofail:
|
||||
{
|
||||
int numlen = errnum != NULL ? (int)STRLEN(errnum) : 0;
|
||||
|
||||
attr = hl_attr(HLF_E); /* set highlight for error messages */
|
||||
attr = HL_ATTR(HLF_E); /* set highlight for error messages */
|
||||
msg_add_fname(buf,
|
||||
#ifndef UNIX
|
||||
sfname
|
||||
@ -5300,7 +5300,7 @@ check_mtime(buf_T *buf, stat_T *st)
|
||||
msg_silent = 0; /* must give this prompt */
|
||||
/* don't use emsg() here, don't want to flush the buffers */
|
||||
MSG_ATTR(_("WARNING: The file has been changed since reading it!!!"),
|
||||
hl_attr(HLF_E));
|
||||
HL_ATTR(HLF_E));
|
||||
if (ask_yesno((char_u *)_("Do you really want to write to it"),
|
||||
TRUE) == 'n')
|
||||
return FAIL;
|
||||
@ -7011,10 +7011,10 @@ buf_check_timestamp(
|
||||
# endif
|
||||
{
|
||||
msg_start();
|
||||
msg_puts_attr(tbuf, hl_attr(HLF_E) + MSG_HIST);
|
||||
msg_puts_attr(tbuf, HL_ATTR(HLF_E) + MSG_HIST);
|
||||
if (*mesg2 != NUL)
|
||||
msg_puts_attr((char_u *)mesg2,
|
||||
hl_attr(HLF_W) + MSG_HIST);
|
||||
HL_ATTR(HLF_W) + MSG_HIST);
|
||||
msg_clr_eos();
|
||||
(void)msg_end();
|
||||
if (emsg_silent == 0)
|
||||
@ -7840,12 +7840,12 @@ show_autocmd(AutoPat *ap, event_T event)
|
||||
if (ap->group != AUGROUP_DEFAULT)
|
||||
{
|
||||
if (AUGROUP_NAME(ap->group) == NULL)
|
||||
msg_puts_attr(get_deleted_augroup(), hl_attr(HLF_E));
|
||||
msg_puts_attr(get_deleted_augroup(), HL_ATTR(HLF_E));
|
||||
else
|
||||
msg_puts_attr(AUGROUP_NAME(ap->group), hl_attr(HLF_T));
|
||||
msg_puts_attr(AUGROUP_NAME(ap->group), HL_ATTR(HLF_T));
|
||||
msg_puts((char_u *)" ");
|
||||
}
|
||||
msg_puts_attr(event_nr2name(event), hl_attr(HLF_T));
|
||||
msg_puts_attr(event_nr2name(event), HL_ATTR(HLF_T));
|
||||
last_event = event;
|
||||
last_group = ap->group;
|
||||
msg_putchar('\n');
|
||||
|
@ -4022,9 +4022,9 @@ showmap(
|
||||
} while (len < 12);
|
||||
|
||||
if (mp->m_noremap == REMAP_NONE)
|
||||
msg_puts_attr((char_u *)"*", hl_attr(HLF_8));
|
||||
msg_puts_attr((char_u *)"*", HL_ATTR(HLF_8));
|
||||
else if (mp->m_noremap == REMAP_SCRIPT)
|
||||
msg_puts_attr((char_u *)"&", hl_attr(HLF_8));
|
||||
msg_puts_attr((char_u *)"&", HL_ATTR(HLF_8));
|
||||
else
|
||||
msg_putchar(' ');
|
||||
|
||||
@ -4036,7 +4036,7 @@ showmap(
|
||||
/* Use FALSE below if we only want things like <Up> to show up as such on
|
||||
* the rhs, and not M-x etc, TRUE gets both -- webb */
|
||||
if (*mp->m_str == NUL)
|
||||
msg_puts_attr((char_u *)"<Nop>", hl_attr(HLF_8));
|
||||
msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8));
|
||||
else
|
||||
{
|
||||
/* Remove escaping of CSI, because "m_str" is in a format to be used
|
||||
|
@ -1054,7 +1054,7 @@ set_printable_label_text(GtkLabel *label, char_u *text)
|
||||
#endif
|
||||
|
||||
/* Look up the RGB values of the SpecialKey foreground color. */
|
||||
aep = syn_gui_attr2entry(hl_attr(HLF_8));
|
||||
aep = syn_gui_attr2entry(HL_ATTR(HLF_8));
|
||||
pixel = (aep != NULL) ? aep->ae_u.gui.fg_color : INVALCOLOR;
|
||||
if (pixel != INVALCOLOR)
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
|
@ -569,7 +569,7 @@ prt_header(
|
||||
prt_message(char_u *s)
|
||||
{
|
||||
screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', 0);
|
||||
screen_puts(s, (int)Rows - 1, 0, hl_attr(HLF_R));
|
||||
screen_puts(s, (int)Rows - 1, 0, HL_ATTR(HLF_R));
|
||||
out_flush();
|
||||
}
|
||||
|
||||
|
@ -615,7 +615,7 @@ staterr:
|
||||
if (p_csverbose)
|
||||
{
|
||||
msg_clr_eos();
|
||||
(void)smsg_attr(hl_attr(HLF_R),
|
||||
(void)smsg_attr(HL_ATTR(HLF_R),
|
||||
(char_u *)_("Added cscope database %s"),
|
||||
csinfo[i].fname);
|
||||
}
|
||||
@ -1612,7 +1612,7 @@ cs_kill_execute(
|
||||
if (p_csverbose)
|
||||
{
|
||||
msg_clr_eos();
|
||||
(void)smsg_attr(hl_attr(HLF_R) | MSG_HIST,
|
||||
(void)smsg_attr(HL_ATTR(HLF_R) | MSG_HIST,
|
||||
(char_u *)_("cscope connection %s closed"), cname);
|
||||
}
|
||||
cs_release_csp(i, TRUE);
|
||||
@ -2020,14 +2020,14 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
|
||||
{
|
||||
bufsize = newsize;
|
||||
(void)sprintf(buf, cstag_msg, ptag);
|
||||
MSG_PUTS_ATTR(buf, hl_attr(HLF_T));
|
||||
MSG_PUTS_ATTR(buf, HL_ATTR(HLF_T));
|
||||
}
|
||||
|
||||
vim_free(tbuf);
|
||||
|
||||
MSG_PUTS_ATTR(_("\n # line"), hl_attr(HLF_T)); /* strlen is 7 */
|
||||
MSG_PUTS_ATTR(_("\n # line"), HL_ATTR(HLF_T)); /* strlen is 7 */
|
||||
msg_advance(msg_col + 2);
|
||||
MSG_PUTS_ATTR(_("filename / context / line\n"), hl_attr(HLF_T));
|
||||
MSG_PUTS_ATTR(_("filename / context / line\n"), HL_ATTR(HLF_T));
|
||||
|
||||
num = 1;
|
||||
for (i = 0; i < num_matches; i++)
|
||||
@ -2071,9 +2071,9 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
|
||||
{
|
||||
/* csfmt_str = "%4d %6s "; */
|
||||
(void)sprintf(buf, csfmt_str, num, lno);
|
||||
MSG_PUTS_ATTR(buf, hl_attr(HLF_CM));
|
||||
MSG_PUTS_ATTR(buf, HL_ATTR(HLF_CM));
|
||||
}
|
||||
MSG_PUTS_LONG_ATTR(cs_pathcomponents(fname), hl_attr(HLF_CM));
|
||||
MSG_PUTS_LONG_ATTR(cs_pathcomponents(fname), HL_ATTR(HLF_CM));
|
||||
|
||||
/* compute the required space for the context */
|
||||
if (cntxts[idx] != NULL)
|
||||
@ -2399,7 +2399,7 @@ cs_reset(exarg_T *eap UNUSED)
|
||||
* "Added cscope database..."
|
||||
*/
|
||||
sprintf(buf, " (#%d)", i);
|
||||
MSG_PUTS_ATTR(buf, hl_attr(HLF_R));
|
||||
MSG_PUTS_ATTR(buf, HL_ATTR(HLF_R));
|
||||
}
|
||||
}
|
||||
vim_free(dblist[i]);
|
||||
@ -2411,7 +2411,7 @@ cs_reset(exarg_T *eap UNUSED)
|
||||
vim_free(fllist);
|
||||
|
||||
if (p_csverbose)
|
||||
MSG_ATTR(_("All cscope databases reset"), hl_attr(HLF_R) | MSG_HIST);
|
||||
MSG_ATTR(_("All cscope databases reset"), HL_ATTR(HLF_R) | MSG_HIST);
|
||||
return CSCOPE_SUCCESS;
|
||||
} /* cs_reset */
|
||||
|
||||
@ -2497,7 +2497,7 @@ cs_show(exarg_T *eap UNUSED)
|
||||
{
|
||||
MSG_PUTS_ATTR(
|
||||
_(" # pid database name prepend path\n"),
|
||||
hl_attr(HLF_T));
|
||||
HL_ATTR(HLF_T));
|
||||
for (i = 0; i < csinfo_size; i++)
|
||||
{
|
||||
if (csinfo[i].fname == NULL)
|
||||
|
@ -231,7 +231,7 @@ serverRegisterName(
|
||||
if (res < -1 || i >= 1000)
|
||||
{
|
||||
MSG_ATTR(_("Unable to register a command server name"),
|
||||
hl_attr(HLF_W));
|
||||
HL_ATTR(HLF_W));
|
||||
return FAIL;
|
||||
}
|
||||
if (p == NULL)
|
||||
|
@ -794,7 +794,7 @@ show_one_mark(
|
||||
}
|
||||
if (name != NULL)
|
||||
{
|
||||
msg_outtrans_attr(name, current ? hl_attr(HLF_D) : 0);
|
||||
msg_outtrans_attr(name, current ? HL_ATTR(HLF_D) : 0);
|
||||
if (mustfree)
|
||||
vim_free(name);
|
||||
}
|
||||
@ -926,7 +926,7 @@ ex_jumps(exarg_T *eap UNUSED)
|
||||
msg_outtrans(IObuff);
|
||||
msg_outtrans_attr(name,
|
||||
curwin->w_jumplist[i].fmark.fnum == curbuf->b_fnum
|
||||
? hl_attr(HLF_D) : 0);
|
||||
? HL_ATTR(HLF_D) : 0);
|
||||
vim_free(name);
|
||||
ui_breakcheck();
|
||||
}
|
||||
@ -973,7 +973,7 @@ ex_changes(exarg_T *eap UNUSED)
|
||||
name = mark_line(&curbuf->b_changelist[i], 17);
|
||||
if (name == NULL)
|
||||
break;
|
||||
msg_outtrans_attr(name, hl_attr(HLF_D));
|
||||
msg_outtrans_attr(name, HL_ATTR(HLF_D));
|
||||
vim_free(name);
|
||||
ui_breakcheck();
|
||||
}
|
||||
|
@ -1136,7 +1136,7 @@ ml_recover(void)
|
||||
|
||||
recoverymode = TRUE;
|
||||
called_from_main = (curbuf->b_ml.ml_mfp == NULL);
|
||||
attr = hl_attr(HLF_E);
|
||||
attr = HL_ATTR(HLF_E);
|
||||
|
||||
/*
|
||||
* If the file name ends in ".s[uvw][a-z]" we assume this is the swap file.
|
||||
|
@ -1132,7 +1132,7 @@ show_menus_recursive(vimmenu_T *menu, int modes, int depth)
|
||||
MSG_PUTS(" ");
|
||||
}
|
||||
/* Same highlighting as for directories!? */
|
||||
msg_outtrans_attr(menu->name, hl_attr(HLF_D));
|
||||
msg_outtrans_attr(menu->name, HL_ATTR(HLF_D));
|
||||
}
|
||||
|
||||
if (menu != NULL && menu->children == NULL)
|
||||
@ -1162,7 +1162,7 @@ show_menus_recursive(vimmenu_T *menu, int modes, int depth)
|
||||
msg_putchar(' ');
|
||||
MSG_PUTS(" ");
|
||||
if (*menu->strings[bit] == NUL)
|
||||
msg_puts_attr((char_u *)"<Nop>", hl_attr(HLF_8));
|
||||
msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8));
|
||||
else
|
||||
msg_outtrans_special(menu->strings[bit], FALSE);
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ msg_source(int attr)
|
||||
p = get_emsg_lnum();
|
||||
if (p != NULL)
|
||||
{
|
||||
msg_attr(p, hl_attr(HLF_N));
|
||||
msg_attr(p, HL_ATTR(HLF_N));
|
||||
vim_free(p);
|
||||
last_sourcing_lnum = sourcing_lnum; /* only once for each line */
|
||||
}
|
||||
@ -690,7 +690,7 @@ emsg(char_u *s)
|
||||
|
||||
emsg_on_display = TRUE; /* remember there is an error message */
|
||||
++msg_scroll; /* don't overwrite a previous message */
|
||||
attr = hl_attr(HLF_E); /* set highlight mode for error messages */
|
||||
attr = HL_ATTR(HLF_E); /* set highlight mode for error messages */
|
||||
if (msg_scrolled != 0)
|
||||
need_wait_return = TRUE; /* needed in case emsg() is called after
|
||||
* wait_return has reset need_wait_return
|
||||
@ -985,7 +985,7 @@ ex_messages(exarg_T *eap)
|
||||
if (s != NULL && *s != NUL)
|
||||
msg_attr((char_u *)
|
||||
_("Messages maintainer: Bram Moolenaar <Bram@vim.org>"),
|
||||
hl_attr(HLF_T));
|
||||
HL_ATTR(HLF_T));
|
||||
}
|
||||
|
||||
/* Display what was not skipped. */
|
||||
@ -1280,7 +1280,7 @@ hit_return_msg(void)
|
||||
if (got_int)
|
||||
MSG_PUTS(_("Interrupt: "));
|
||||
|
||||
MSG_PUTS_ATTR(_("Press ENTER or type command to continue"), hl_attr(HLF_R));
|
||||
MSG_PUTS_ATTR(_("Press ENTER or type command to continue"), HL_ATTR(HLF_R));
|
||||
if (!msg_use_printf())
|
||||
msg_clr_eos();
|
||||
p_more = save_p_more;
|
||||
@ -1431,7 +1431,7 @@ msg_home_replace(char_u *fname)
|
||||
void
|
||||
msg_home_replace_hl(char_u *fname)
|
||||
{
|
||||
msg_home_replace_attr(fname, hl_attr(HLF_D));
|
||||
msg_home_replace_attr(fname, HL_ATTR(HLF_D));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1544,7 +1544,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
|
||||
msg_puts_attr_len(plain_start, (int)(str - plain_start),
|
||||
attr);
|
||||
plain_start = str + mb_l;
|
||||
msg_puts_attr(transchar(c), attr == 0 ? hl_attr(HLF_8) : attr);
|
||||
msg_puts_attr(transchar(c), attr == 0 ? HL_ATTR(HLF_8) : attr);
|
||||
retval += char2cells(c);
|
||||
}
|
||||
len -= mb_l - 1;
|
||||
@ -1562,7 +1562,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
|
||||
msg_puts_attr_len(plain_start, (int)(str - plain_start),
|
||||
attr);
|
||||
plain_start = str + 1;
|
||||
msg_puts_attr(s, attr == 0 ? hl_attr(HLF_8) : attr);
|
||||
msg_puts_attr(s, attr == 0 ? HL_ATTR(HLF_8) : attr);
|
||||
retval += (int)STRLEN(s);
|
||||
}
|
||||
else
|
||||
@ -1623,7 +1623,7 @@ msg_outtrans_special(
|
||||
int attr;
|
||||
int len;
|
||||
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
while (*str != NUL)
|
||||
{
|
||||
/* Leading and trailing spaces need to be displayed in <> form. */
|
||||
@ -1846,13 +1846,13 @@ msg_prt_line(char_u *s, int list)
|
||||
{
|
||||
c = lcs_tab1;
|
||||
c_extra = lcs_tab2;
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
}
|
||||
}
|
||||
else if (c == 160 && list && lcs_nbsp != NUL)
|
||||
{
|
||||
c = lcs_nbsp;
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
}
|
||||
else if (c == NUL && list && lcs_eol != NUL)
|
||||
{
|
||||
@ -1860,7 +1860,7 @@ msg_prt_line(char_u *s, int list)
|
||||
c_extra = NUL;
|
||||
n_extra = 1;
|
||||
c = lcs_eol;
|
||||
attr = hl_attr(HLF_AT);
|
||||
attr = HL_ATTR(HLF_AT);
|
||||
--s;
|
||||
}
|
||||
else if (c != NUL && (n = byte2cells(c)) > 1)
|
||||
@ -1871,17 +1871,17 @@ msg_prt_line(char_u *s, int list)
|
||||
c = *p_extra++;
|
||||
/* Use special coloring to be able to distinguish <hex> from
|
||||
* the same in plain text. */
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
}
|
||||
else if (c == ' ' && trail != NULL && s > trail)
|
||||
{
|
||||
c = lcs_trail;
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
}
|
||||
else if (c == ' ' && list && lcs_space != NUL)
|
||||
{
|
||||
c = lcs_space;
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1913,7 +1913,7 @@ screen_puts_mbyte(char_u *s, int l, int attr)
|
||||
msg_col == Columns - 1))
|
||||
{
|
||||
/* Doesn't fit, print a highlighted '>' to fill it up. */
|
||||
msg_screen_putchar('>', hl_attr(HLF_AT));
|
||||
msg_screen_putchar('>', HL_ATTR(HLF_AT));
|
||||
return s;
|
||||
}
|
||||
|
||||
@ -1956,7 +1956,7 @@ msg_puts(char_u *s)
|
||||
msg_puts_title(
|
||||
char_u *s)
|
||||
{
|
||||
msg_puts_attr(s, hl_attr(HLF_T));
|
||||
msg_puts_attr(s, HL_ATTR(HLF_T));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1981,7 +1981,7 @@ msg_puts_long_len_attr(char_u *longstr, int len, int attr)
|
||||
{
|
||||
slen = (room - 3) / 2;
|
||||
msg_outtrans_len_attr(longstr, slen, attr);
|
||||
msg_puts_attr((char_u *)"...", hl_attr(HLF_8));
|
||||
msg_puts_attr((char_u *)"...", HL_ATTR(HLF_8));
|
||||
}
|
||||
msg_outtrans_len_attr(longstr + len - slen, slen, attr);
|
||||
}
|
||||
@ -3067,7 +3067,7 @@ msg_moremsg(int full)
|
||||
int attr;
|
||||
char_u *s = (char_u *)_("-- More --");
|
||||
|
||||
attr = hl_attr(HLF_M);
|
||||
attr = HL_ATTR(HLF_M);
|
||||
screen_puts(s, (int)Rows - 1, 0, attr);
|
||||
if (full)
|
||||
screen_puts((char_u *)
|
||||
@ -3420,7 +3420,7 @@ give_warning(char_u *message, int hl)
|
||||
vim_free(keep_msg);
|
||||
keep_msg = NULL;
|
||||
if (hl)
|
||||
keep_msg_attr = hl_attr(HLF_W);
|
||||
keep_msg_attr = HL_ATTR(HLF_W);
|
||||
else
|
||||
keep_msg_attr = 0;
|
||||
if (msg_attr(message, keep_msg_attr) && msg_scrolled == 0)
|
||||
@ -3812,7 +3812,7 @@ display_confirm_msg(void)
|
||||
/* avoid that 'q' at the more prompt truncates the message here */
|
||||
++confirm_msg_used;
|
||||
if (confirm_msg != NULL)
|
||||
msg_puts_attr(confirm_msg, hl_attr(HLF_M));
|
||||
msg_puts_attr(confirm_msg, HL_ATTR(HLF_M));
|
||||
--confirm_msg_used;
|
||||
}
|
||||
|
||||
|
10
src/misc1.c
10
src/misc1.c
@ -3265,8 +3265,8 @@ change_warning(
|
||||
msg_start();
|
||||
if (msg_row == Rows - 1)
|
||||
msg_col = col;
|
||||
msg_source(hl_attr(HLF_W));
|
||||
MSG_PUTS_ATTR(_(w_readonly), hl_attr(HLF_W) | MSG_HIST);
|
||||
msg_source(HL_ATTR(HLF_W));
|
||||
MSG_PUTS_ATTR(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST);
|
||||
#ifdef FEAT_EVAL
|
||||
set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1);
|
||||
#endif
|
||||
@ -3319,7 +3319,7 @@ ask_yesno(char_u *str, int direct)
|
||||
while (r != 'y' && r != 'n')
|
||||
{
|
||||
/* same highlighting as for wait_return */
|
||||
smsg_attr(hl_attr(HLF_R), (char_u *)"%s (y/n)?", str);
|
||||
smsg_attr(HL_ATTR(HLF_R), (char_u *)"%s (y/n)?", str);
|
||||
if (direct)
|
||||
r = get_keystroke();
|
||||
else
|
||||
@ -3701,8 +3701,8 @@ vim_beep(
|
||||
* function give the user a hint where the beep comes from. */
|
||||
if (vim_strchr(p_debug, 'e') != NULL)
|
||||
{
|
||||
msg_source(hl_attr(HLF_W));
|
||||
msg_attr((char_u *)_("Beep!"), hl_attr(HLF_W));
|
||||
msg_source(HL_ATTR(HLF_W));
|
||||
msg_attr((char_u *)_("Beep!"), HL_ATTR(HLF_W));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3266,7 +3266,7 @@ check_visual_highlight(void)
|
||||
|
||||
if (full_screen)
|
||||
{
|
||||
if (!did_check && hl_attr(HLF_V) == 0)
|
||||
if (!did_check && HL_ATTR(HLF_V) == 0)
|
||||
MSG(_("Warning: terminal cannot highlight"));
|
||||
did_check = TRUE;
|
||||
}
|
||||
|
@ -4112,7 +4112,7 @@ ex_display(exarg_T *eap)
|
||||
|
||||
if (arg != NULL && *arg == NUL)
|
||||
arg = NULL;
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
|
||||
/* Highlight title */
|
||||
MSG_PUTS_TITLE(_("\n--- Registers ---"));
|
||||
|
@ -8556,8 +8556,8 @@ set_bool_option(
|
||||
{
|
||||
static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'");
|
||||
|
||||
msg_source(hl_attr(HLF_W));
|
||||
MSG_ATTR(_(w_arabic), hl_attr(HLF_W));
|
||||
msg_source(HL_ATTR(HLF_W));
|
||||
MSG_ATTR(_(w_arabic), HL_ATTR(HLF_W));
|
||||
#ifdef FEAT_EVAL
|
||||
set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1);
|
||||
#endif
|
||||
|
@ -2555,7 +2555,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_L) : HL_ATTR(HLF_D));
|
||||
if (qfp->qf_lnum == 0)
|
||||
IObuff[0] = NUL;
|
||||
else if (qfp->qf_col == 0)
|
||||
@ -2565,7 +2565,7 @@ qf_list(exarg_T *eap)
|
||||
qfp->qf_lnum, qfp->qf_col);
|
||||
sprintf((char *)IObuff + STRLEN(IObuff), "%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)
|
||||
{
|
||||
qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE);
|
||||
|
150
src/screen.c
150
src/screen.c
@ -2139,10 +2139,10 @@ win_update(win_T *wp)
|
||||
* Last line isn't finished: Display "@@@" in the last screen line.
|
||||
*/
|
||||
screen_puts_len((char_u *)"@@", 2, scr_row, W_WINCOL(wp),
|
||||
hl_attr(HLF_AT));
|
||||
HL_ATTR(HLF_AT));
|
||||
screen_fill(scr_row, scr_row + 1,
|
||||
(int)W_WINCOL(wp) + 2, (int)W_ENDCOL(wp),
|
||||
'@', ' ', hl_attr(HLF_AT));
|
||||
'@', ' ', HL_ATTR(HLF_AT));
|
||||
set_empty_rows(wp, srow);
|
||||
wp->w_botline = lnum;
|
||||
}
|
||||
@ -2154,7 +2154,7 @@ win_update(win_T *wp)
|
||||
screen_fill(W_WINROW(wp) + wp->w_height - 1,
|
||||
W_WINROW(wp) + wp->w_height,
|
||||
(int)W_ENDCOL(wp) - 3, (int)W_ENDCOL(wp),
|
||||
'@', '@', hl_attr(HLF_AT));
|
||||
'@', '@', HL_ATTR(HLF_AT));
|
||||
set_empty_rows(wp, srow);
|
||||
wp->w_botline = lnum;
|
||||
}
|
||||
@ -2282,7 +2282,7 @@ win_draw_end(
|
||||
n = W_WIDTH(wp);
|
||||
screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
|
||||
W_ENDCOL(wp) - n, (int)W_ENDCOL(wp),
|
||||
' ', ' ', hl_attr(HLF_FC));
|
||||
' ', ' ', HL_ATTR(HLF_FC));
|
||||
}
|
||||
# endif
|
||||
# ifdef FEAT_SIGNS
|
||||
@ -2295,16 +2295,16 @@ win_draw_end(
|
||||
nn = W_WIDTH(wp);
|
||||
screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
|
||||
W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - n,
|
||||
' ', ' ', hl_attr(HLF_SC));
|
||||
' ', ' ', HL_ATTR(HLF_SC));
|
||||
n = nn;
|
||||
}
|
||||
# endif
|
||||
screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
|
||||
W_WINCOL(wp), W_ENDCOL(wp) - 1 - FDC_OFF,
|
||||
c2, c2, hl_attr(hl));
|
||||
c2, c2, HL_ATTR(hl));
|
||||
screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
|
||||
W_ENDCOL(wp) - 1 - FDC_OFF, W_ENDCOL(wp) - FDC_OFF,
|
||||
c1, c2, hl_attr(hl));
|
||||
c1, c2, HL_ATTR(hl));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -2318,7 +2318,7 @@ win_draw_end(
|
||||
n = wp->w_width;
|
||||
screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
|
||||
W_WINCOL(wp), (int)W_WINCOL(wp) + n,
|
||||
cmdwin_type, ' ', hl_attr(HLF_AT));
|
||||
cmdwin_type, ' ', HL_ATTR(HLF_AT));
|
||||
}
|
||||
#endif
|
||||
#ifdef FEAT_FOLDING
|
||||
@ -2331,7 +2331,7 @@ win_draw_end(
|
||||
nn = W_WIDTH(wp);
|
||||
screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
|
||||
W_WINCOL(wp) + n, (int)W_WINCOL(wp) + nn,
|
||||
' ', ' ', hl_attr(HLF_FC));
|
||||
' ', ' ', HL_ATTR(HLF_FC));
|
||||
n = nn;
|
||||
}
|
||||
#endif
|
||||
@ -2345,13 +2345,13 @@ win_draw_end(
|
||||
nn = W_WIDTH(wp);
|
||||
screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
|
||||
W_WINCOL(wp) + n, (int)W_WINCOL(wp) + nn,
|
||||
' ', ' ', hl_attr(HLF_SC));
|
||||
' ', ' ', HL_ATTR(HLF_SC));
|
||||
n = nn;
|
||||
}
|
||||
#endif
|
||||
screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
|
||||
W_WINCOL(wp) + FDC_OFF, (int)W_ENDCOL(wp),
|
||||
c1, c2, hl_attr(hl));
|
||||
c1, c2, HL_ATTR(hl));
|
||||
}
|
||||
set_empty_rows(wp, row);
|
||||
}
|
||||
@ -2428,7 +2428,7 @@ fold_line(
|
||||
if (cmdwin_type != 0 && wp == curwin)
|
||||
{
|
||||
ScreenLines[off] = cmdwin_type;
|
||||
ScreenAttrs[off] = hl_attr(HLF_AT);
|
||||
ScreenAttrs[off] = HL_ATTR(HLF_AT);
|
||||
#ifdef FEAT_MBYTE
|
||||
if (enc_utf8)
|
||||
ScreenLinesUC[off] = 0;
|
||||
@ -2451,14 +2451,14 @@ fold_line(
|
||||
int i;
|
||||
|
||||
copy_text_attr(off + W_WIDTH(wp) - fdc - col, buf, fdc,
|
||||
hl_attr(HLF_FC));
|
||||
HL_ATTR(HLF_FC));
|
||||
/* reverse the fold column */
|
||||
for (i = 0; i < fdc; ++i)
|
||||
ScreenLines[off + W_WIDTH(wp) - i - 1 - col] = buf[i];
|
||||
}
|
||||
else
|
||||
#endif
|
||||
copy_text_attr(off + col, buf, fdc, hl_attr(HLF_FC));
|
||||
copy_text_attr(off + col, buf, fdc, HL_ATTR(HLF_FC));
|
||||
col += fdc;
|
||||
}
|
||||
|
||||
@ -2476,7 +2476,7 @@ fold_line(
|
||||
|
||||
/* Set all attributes of the 'number' or 'relativenumber' column and the
|
||||
* text */
|
||||
RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col);
|
||||
RL_MEMSET(col, HL_ATTR(HLF_FL), W_WIDTH(wp) - col);
|
||||
|
||||
#ifdef FEAT_SIGNS
|
||||
/* If signs are being displayed, add two spaces. */
|
||||
@ -2491,10 +2491,10 @@ fold_line(
|
||||
if (wp->w_p_rl)
|
||||
/* the line number isn't reversed */
|
||||
copy_text_attr(off + W_WIDTH(wp) - len - col,
|
||||
(char_u *)" ", len, hl_attr(HLF_FL));
|
||||
(char_u *)" ", len, HL_ATTR(HLF_FL));
|
||||
else
|
||||
# endif
|
||||
copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_FL));
|
||||
copy_text_attr(off + col, (char_u *)" ", len, HL_ATTR(HLF_FL));
|
||||
col += len;
|
||||
}
|
||||
}
|
||||
@ -2536,10 +2536,10 @@ fold_line(
|
||||
if (wp->w_p_rl)
|
||||
/* the line number isn't reversed */
|
||||
copy_text_attr(off + W_WIDTH(wp) - len - col, buf, len,
|
||||
hl_attr(HLF_FL));
|
||||
HL_ATTR(HLF_FL));
|
||||
else
|
||||
#endif
|
||||
copy_text_attr(off + col, buf, len, hl_attr(HLF_FL));
|
||||
copy_text_attr(off + col, buf, len, HL_ATTR(HLF_FL));
|
||||
col += len;
|
||||
}
|
||||
}
|
||||
@ -2748,14 +2748,14 @@ fold_line(
|
||||
len = wp->w_old_cursor_lcol;
|
||||
else
|
||||
len = W_WIDTH(wp) - txtcol;
|
||||
RL_MEMSET(wp->w_old_cursor_fcol + txtcol, hl_attr(HLF_V),
|
||||
RL_MEMSET(wp->w_old_cursor_fcol + txtcol, HL_ATTR(HLF_V),
|
||||
len - (int)wp->w_old_cursor_fcol);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set all attributes of the text */
|
||||
RL_MEMSET(txtcol, hl_attr(HLF_V), W_WIDTH(wp) - txtcol);
|
||||
RL_MEMSET(txtcol, HL_ATTR(HLF_V), W_WIDTH(wp) - txtcol);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2777,7 +2777,7 @@ fold_line(
|
||||
txtcol -= wp->w_leftcol;
|
||||
if (txtcol >= 0 && txtcol < W_WIDTH(wp))
|
||||
ScreenAttrs[off + txtcol] = hl_combine_attr(
|
||||
ScreenAttrs[off + txtcol], hl_attr(HLF_MC));
|
||||
ScreenAttrs[off + txtcol], HL_ATTR(HLF_MC));
|
||||
txtcol = old_txtcol;
|
||||
j = wp->w_p_cc_cols[++i];
|
||||
}
|
||||
@ -2793,7 +2793,7 @@ fold_line(
|
||||
txtcol -= wp->w_leftcol;
|
||||
if (txtcol >= 0 && txtcol < W_WIDTH(wp))
|
||||
ScreenAttrs[off + txtcol] = hl_combine_attr(
|
||||
ScreenAttrs[off + txtcol], hl_attr(HLF_CUC));
|
||||
ScreenAttrs[off + txtcol], HL_ATTR(HLF_CUC));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -3063,7 +3063,7 @@ win_line(
|
||||
int syntax_flags = 0;
|
||||
int syntax_seqnr = 0;
|
||||
int prev_syntax_id = 0;
|
||||
int conceal_attr = hl_attr(HLF_CONCEAL);
|
||||
int conceal_attr = HL_ATTR(HLF_CONCEAL);
|
||||
int is_concealing = FALSE;
|
||||
int boguscols = 0; /* nonexistent columns added to force
|
||||
wrapping */
|
||||
@ -3243,13 +3243,13 @@ win_line(
|
||||
if (fromcol >= 0)
|
||||
{
|
||||
area_highlighting = TRUE;
|
||||
attr = hl_attr(HLF_V);
|
||||
attr = HL_ATTR(HLF_V);
|
||||
#if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
|
||||
if ((clip_star.available && !clip_star.owned
|
||||
&& clip_isautosel_star())
|
||||
|| (clip_plus.available && !clip_plus.owned
|
||||
&& clip_isautosel_plus()))
|
||||
attr = hl_attr(HLF_VNC);
|
||||
attr = HL_ATTR(HLF_VNC);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -3279,7 +3279,7 @@ win_line(
|
||||
if (fromcol == tocol)
|
||||
tocol = fromcol + 1;
|
||||
area_highlighting = TRUE;
|
||||
attr = hl_attr(HLF_I);
|
||||
attr = HL_ATTR(HLF_I);
|
||||
}
|
||||
|
||||
#ifdef FEAT_DIFF
|
||||
@ -3315,7 +3315,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_L);
|
||||
# endif
|
||||
if (line_attr != 0)
|
||||
area_highlighting = TRUE;
|
||||
@ -3592,7 +3592,7 @@ win_line(
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum
|
||||
&& !(wp == curwin && VIsual_active))
|
||||
{
|
||||
line_attr = hl_attr(HLF_CUL);
|
||||
line_attr = HL_ATTR(HLF_CUL);
|
||||
area_highlighting = TRUE;
|
||||
}
|
||||
#endif
|
||||
@ -3630,7 +3630,7 @@ win_line(
|
||||
/* Draw the cmdline character. */
|
||||
n_extra = 1;
|
||||
c_extra = cmdwin_type;
|
||||
char_attr = hl_attr(HLF_AT);
|
||||
char_attr = HL_ATTR(HLF_AT);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -3655,7 +3655,7 @@ win_line(
|
||||
p_extra_free[n_extra] = NUL;
|
||||
p_extra = p_extra_free;
|
||||
c_extra = NUL;
|
||||
char_attr = hl_attr(HLF_FC);
|
||||
char_attr = HL_ATTR(HLF_FC);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3676,7 +3676,7 @@ win_line(
|
||||
|
||||
/* Draw two cells with the sign value or blank. */
|
||||
c_extra = ' ';
|
||||
char_attr = hl_attr(HLF_SC);
|
||||
char_attr = HL_ATTR(HLF_SC);
|
||||
n_extra = 2;
|
||||
|
||||
if (row == startrow
|
||||
@ -3769,7 +3769,7 @@ win_line(
|
||||
else
|
||||
c_extra = ' ';
|
||||
n_extra = number_width(wp) + 1;
|
||||
char_attr = hl_attr(HLF_N);
|
||||
char_attr = HL_ATTR(HLF_N);
|
||||
#ifdef FEAT_SYN_HL
|
||||
/* When 'cursorline' is set highlight the line number of
|
||||
* the current line differently.
|
||||
@ -3777,7 +3777,7 @@ win_line(
|
||||
* when CursorLineNr isn't set? */
|
||||
if ((wp->w_p_cul || wp->w_p_rnu)
|
||||
&& lnum == wp->w_cursor.lnum)
|
||||
char_attr = hl_attr(HLF_CLN);
|
||||
char_attr = HL_ATTR(HLF_CLN);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -3807,11 +3807,11 @@ win_line(
|
||||
# ifdef FEAT_DIFF
|
||||
if (diff_hlf != (hlf_T)0)
|
||||
{
|
||||
char_attr = hl_attr(diff_hlf);
|
||||
char_attr = HL_ATTR(diff_hlf);
|
||||
# ifdef FEAT_SYN_HL
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
|
||||
char_attr = hl_combine_attr(char_attr,
|
||||
hl_attr(HLF_CUL));
|
||||
HL_ATTR(HLF_CUL));
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
@ -3845,7 +3845,7 @@ win_line(
|
||||
else
|
||||
# endif
|
||||
n_extra = W_WIDTH(wp) - col;
|
||||
char_attr = hl_attr(HLF_DED);
|
||||
char_attr = HL_ATTR(HLF_DED);
|
||||
}
|
||||
# endif
|
||||
# ifdef FEAT_LINEBREAK
|
||||
@ -3855,7 +3855,7 @@ win_line(
|
||||
p_extra = p_sbr;
|
||||
c_extra = NUL;
|
||||
n_extra = (int)STRLEN(p_sbr);
|
||||
char_attr = hl_attr(HLF_AT);
|
||||
char_attr = HL_ATTR(HLF_AT);
|
||||
need_showbreak = FALSE;
|
||||
vcol_sbr = vcol + MB_CHARLEN(p_sbr);
|
||||
/* Correct end of highlighted area for 'showbreak',
|
||||
@ -3866,7 +3866,7 @@ win_line(
|
||||
/* combine 'showbreak' with 'cursorline' */
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
|
||||
char_attr = hl_combine_attr(char_attr,
|
||||
hl_attr(HLF_CUL));
|
||||
HL_ATTR(HLF_CUL));
|
||||
#endif
|
||||
}
|
||||
# endif
|
||||
@ -4061,9 +4061,9 @@ win_line(
|
||||
if (diff_hlf == HLF_TXD && ptr - line > change_end
|
||||
&& n_extra == 0)
|
||||
diff_hlf = HLF_CHD; /* changed line */
|
||||
line_attr = hl_attr(diff_hlf);
|
||||
line_attr = HL_ATTR(diff_hlf);
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
|
||||
line_attr = hl_combine_attr(line_attr, hl_attr(HLF_CUL));
|
||||
line_attr = hl_combine_attr(line_attr, HL_ATTR(HLF_CUL));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -4173,7 +4173,7 @@ win_line(
|
||||
mb_c = c;
|
||||
mb_l = 1;
|
||||
mb_utf8 = FALSE;
|
||||
multi_attr = hl_attr(HLF_AT);
|
||||
multi_attr = HL_ATTR(HLF_AT);
|
||||
/* put the pointer back to output the double-width
|
||||
* character at the start of the next line. */
|
||||
++n_extra;
|
||||
@ -4284,7 +4284,7 @@ win_line(
|
||||
if (area_attr == 0 && search_attr == 0)
|
||||
{
|
||||
n_attr = n_extra + 1;
|
||||
extra_attr = hl_attr(HLF_8);
|
||||
extra_attr = HL_ATTR(HLF_8);
|
||||
saved_attr2 = char_attr; /* save current attr */
|
||||
}
|
||||
}
|
||||
@ -4353,7 +4353,7 @@ win_line(
|
||||
if (area_attr == 0 && search_attr == 0)
|
||||
{
|
||||
n_attr = n_extra + 1;
|
||||
extra_attr = hl_attr(HLF_8);
|
||||
extra_attr = HL_ATTR(HLF_8);
|
||||
saved_attr2 = char_attr; /* save current attr */
|
||||
}
|
||||
mb_c = c;
|
||||
@ -4374,7 +4374,7 @@ win_line(
|
||||
mb_c = c;
|
||||
mb_utf8 = FALSE;
|
||||
mb_l = 1;
|
||||
multi_attr = hl_attr(HLF_AT);
|
||||
multi_attr = HL_ATTR(HLF_AT);
|
||||
/* Put pointer back so that the character will be
|
||||
* displayed at the start of the next line. */
|
||||
--ptr;
|
||||
@ -4393,7 +4393,7 @@ win_line(
|
||||
if (area_attr == 0 && search_attr == 0)
|
||||
{
|
||||
n_attr = n_extra + 1;
|
||||
extra_attr = hl_attr(HLF_AT);
|
||||
extra_attr = HL_ATTR(HLF_AT);
|
||||
saved_attr2 = char_attr; /* save current attr */
|
||||
}
|
||||
mb_c = c;
|
||||
@ -4604,7 +4604,7 @@ win_line(
|
||||
if (area_attr == 0 && search_attr == 0)
|
||||
{
|
||||
n_attr = 1;
|
||||
extra_attr = hl_attr(HLF_8);
|
||||
extra_attr = HL_ATTR(HLF_8);
|
||||
saved_attr2 = char_attr; /* save current attr */
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
@ -4626,7 +4626,7 @@ win_line(
|
||||
if (!attr_pri)
|
||||
{
|
||||
n_attr = 1;
|
||||
extra_attr = hl_attr(HLF_8);
|
||||
extra_attr = HL_ATTR(HLF_8);
|
||||
saved_attr2 = char_attr; /* save current attr */
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
@ -4758,7 +4758,7 @@ win_line(
|
||||
#endif
|
||||
c_extra = lcs_tab2;
|
||||
n_attr = tab_len + 1;
|
||||
extra_attr = hl_attr(HLF_8);
|
||||
extra_attr = HL_ATTR(HLF_8);
|
||||
saved_attr2 = char_attr; /* save current attr */
|
||||
#ifdef FEAT_MBYTE
|
||||
mb_c = c;
|
||||
@ -4831,7 +4831,7 @@ win_line(
|
||||
--ptr; /* put it back at the NUL */
|
||||
if (!attr_pri)
|
||||
{
|
||||
extra_attr = hl_attr(HLF_AT);
|
||||
extra_attr = HL_ATTR(HLF_AT);
|
||||
n_attr = 1;
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
@ -4878,7 +4878,7 @@ win_line(
|
||||
if (!attr_pri)
|
||||
{
|
||||
n_attr = n_extra + 1;
|
||||
extra_attr = hl_attr(HLF_8);
|
||||
extra_attr = HL_ATTR(HLF_8);
|
||||
saved_attr2 = char_attr; /* save current attr */
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
@ -4934,10 +4934,10 @@ win_line(
|
||||
diff_hlf = HLF_CHD;
|
||||
if (attr == 0 || char_attr != attr)
|
||||
{
|
||||
char_attr = hl_attr(diff_hlf);
|
||||
char_attr = HL_ATTR(diff_hlf);
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
|
||||
char_attr = hl_combine_attr(char_attr,
|
||||
hl_attr(HLF_CUL));
|
||||
HL_ATTR(HLF_CUL));
|
||||
}
|
||||
}
|
||||
# endif
|
||||
@ -5104,7 +5104,7 @@ win_line(
|
||||
c_extra = MB_FILLER_CHAR;
|
||||
n_extra = 1;
|
||||
n_attr = 2;
|
||||
extra_attr = hl_attr(HLF_AT);
|
||||
extra_attr = HL_ATTR(HLF_AT);
|
||||
}
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
@ -5119,7 +5119,7 @@ win_line(
|
||||
if (!attr_pri)
|
||||
{
|
||||
saved_attr3 = char_attr; /* save current attr */
|
||||
char_attr = hl_attr(HLF_AT); /* later copied to char_attr */
|
||||
char_attr = HL_ATTR(HLF_AT); /* later copied to char_attr */
|
||||
n_attr3 = 1;
|
||||
}
|
||||
}
|
||||
@ -5326,9 +5326,9 @@ win_line(
|
||||
&color_cols);
|
||||
|
||||
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol)
|
||||
ScreenAttrs[off++] = hl_attr(HLF_CUC);
|
||||
ScreenAttrs[off++] = HL_ATTR(HLF_CUC);
|
||||
else if (draw_color_col && VCOL_HLC == *color_cols)
|
||||
ScreenAttrs[off++] = hl_attr(HLF_MC);
|
||||
ScreenAttrs[off++] = HL_ATTR(HLF_MC);
|
||||
else
|
||||
ScreenAttrs[off++] = 0;
|
||||
|
||||
@ -5377,7 +5377,7 @@ win_line(
|
||||
|| (n_extra && (c_extra != NUL || *p_extra != NUL))))
|
||||
{
|
||||
c = lcs_ext;
|
||||
char_attr = hl_attr(HLF_AT);
|
||||
char_attr = HL_ATTR(HLF_AT);
|
||||
#ifdef FEAT_MBYTE
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
@ -5407,12 +5407,12 @@ win_line(
|
||||
&& lnum != wp->w_cursor.lnum)
|
||||
{
|
||||
vcol_save_attr = char_attr;
|
||||
char_attr = hl_combine_attr(char_attr, hl_attr(HLF_CUC));
|
||||
char_attr = hl_combine_attr(char_attr, HL_ATTR(HLF_CUC));
|
||||
}
|
||||
else if (draw_color_col && VCOL_HLC == *color_cols)
|
||||
{
|
||||
vcol_save_attr = char_attr;
|
||||
char_attr = hl_combine_attr(char_attr, hl_attr(HLF_MC));
|
||||
char_attr = hl_combine_attr(char_attr, HL_ATTR(HLF_MC));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -6649,7 +6649,7 @@ win_redr_status_matches(
|
||||
if (selstart != NULL && highlight)
|
||||
{
|
||||
*selend = NUL;
|
||||
screen_puts(selstart, row, selstart_col, hl_attr(HLF_WM));
|
||||
screen_puts(selstart, row, selstart_col, HL_ATTR(HLF_WM));
|
||||
}
|
||||
|
||||
screen_fill(row, row + 1, clen, (int)Columns, fillchar, fillchar, attr);
|
||||
@ -6975,7 +6975,7 @@ win_redr_custom(
|
||||
stl = p_tal;
|
||||
row = 0;
|
||||
fillchar = ' ';
|
||||
attr = hl_attr(HLF_TPF);
|
||||
attr = HL_ATTR(HLF_TPF);
|
||||
maxwidth = Columns;
|
||||
# ifdef FEAT_EVAL
|
||||
use_sandbox = was_set_insecurely((char_u *)"tabline", 0);
|
||||
@ -7322,7 +7322,7 @@ screen_puts_len(
|
||||
{
|
||||
u8c = (mbyte_cells == 2) ? 0xff1f : (int)'?';
|
||||
if (attr == 0)
|
||||
attr = hl_attr(HLF_8);
|
||||
attr = HL_ATTR(HLF_8);
|
||||
}
|
||||
# endif
|
||||
# ifdef FEAT_ARABIC
|
||||
@ -7525,7 +7525,7 @@ start_search_hl(void)
|
||||
if (p_hls && !no_hlsearch)
|
||||
{
|
||||
last_pat_prog(&search_hl.rm);
|
||||
search_hl.attr = hl_attr(HLF_L);
|
||||
search_hl.attr = HL_ATTR(HLF_L);
|
||||
# ifdef FEAT_RELTIME
|
||||
/* Set the time limit to 'redrawtime'. */
|
||||
profile_setlimit(p_rdt, &search_hl.tm);
|
||||
@ -10095,7 +10095,7 @@ showmode(void)
|
||||
/* Position on the last line in the window, column 0 */
|
||||
msg_pos_mode();
|
||||
cursor_off();
|
||||
attr = hl_attr(HLF_CM); /* Highlight mode */
|
||||
attr = HL_ATTR(HLF_CM); /* Highlight mode */
|
||||
if (do_mode)
|
||||
{
|
||||
MSG_PUTS_ATTR("--", attr);
|
||||
@ -10149,7 +10149,7 @@ showmode(void)
|
||||
{
|
||||
MSG_PUTS_ATTR(" ", attr); /* add a space in between */
|
||||
if ((int)edit_submode_highl < (int)HLF_COUNT)
|
||||
sub_attr = hl_attr(edit_submode_highl);
|
||||
sub_attr = HL_ATTR(edit_submode_highl);
|
||||
else
|
||||
sub_attr = attr;
|
||||
msg_puts_attr(edit_submode_extra, sub_attr);
|
||||
@ -10306,7 +10306,7 @@ clearmode(void)
|
||||
{
|
||||
msg_pos_mode();
|
||||
if (Recording)
|
||||
recording_mode(hl_attr(HLF_CM));
|
||||
recording_mode(HL_ATTR(HLF_CM));
|
||||
msg_clr_eos();
|
||||
}
|
||||
|
||||
@ -10341,9 +10341,9 @@ draw_tabline(void)
|
||||
int modified;
|
||||
int c;
|
||||
int len;
|
||||
int attr_sel = hl_attr(HLF_TPS);
|
||||
int attr_nosel = hl_attr(HLF_TP);
|
||||
int attr_fill = hl_attr(HLF_TPF);
|
||||
int attr_sel = HL_ATTR(HLF_TPS);
|
||||
int attr_nosel = HL_ATTR(HLF_TP);
|
||||
int attr_fill = HL_ATTR(HLF_TPF);
|
||||
char_u *p;
|
||||
int room;
|
||||
int use_sep_chars = (t_colors < 8
|
||||
@ -10444,7 +10444,7 @@ draw_tabline(void)
|
||||
break;
|
||||
screen_puts_len(NameBuff, len, 0, col,
|
||||
#if defined(FEAT_SYN_HL)
|
||||
hl_combine_attr(attr, hl_attr(HLF_T))
|
||||
hl_combine_attr(attr, HL_ATTR(HLF_T))
|
||||
#else
|
||||
attr
|
||||
#endif
|
||||
@ -10537,18 +10537,18 @@ fillchar_status(int *attr, int is_curwin)
|
||||
int fill;
|
||||
if (is_curwin)
|
||||
{
|
||||
*attr = hl_attr(HLF_S);
|
||||
*attr = HL_ATTR(HLF_S);
|
||||
fill = fill_stl;
|
||||
}
|
||||
else
|
||||
{
|
||||
*attr = hl_attr(HLF_SNC);
|
||||
*attr = HL_ATTR(HLF_SNC);
|
||||
fill = fill_stlnc;
|
||||
}
|
||||
/* Use fill when there is highlighting, and highlighting of current
|
||||
* window differs, or the fillchars differ, or this is not the
|
||||
* current window */
|
||||
if (*attr != 0 && ((hl_attr(HLF_S) != hl_attr(HLF_SNC)
|
||||
if (*attr != 0 && ((HL_ATTR(HLF_S) != HL_ATTR(HLF_SNC)
|
||||
|| !is_curwin || ONE_WINDOW)
|
||||
|| (fill_stl != fill_stlnc)))
|
||||
return fill;
|
||||
@ -10566,7 +10566,7 @@ fillchar_status(int *attr, int is_curwin)
|
||||
static int
|
||||
fillchar_vsep(int *attr)
|
||||
{
|
||||
*attr = hl_attr(HLF_C);
|
||||
*attr = HL_ATTR(HLF_C);
|
||||
if (*attr == 0 && fill_vert == ' ')
|
||||
return '|';
|
||||
else
|
||||
|
@ -5013,7 +5013,7 @@ find_pattern_in_path(
|
||||
{
|
||||
/* using "new_fname" is more reliable, e.g., when
|
||||
* 'includeexpr' is set. */
|
||||
msg_outtrans_attr(new_fname, hl_attr(HLF_D));
|
||||
msg_outtrans_attr(new_fname, HL_ATTR(HLF_D));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5059,7 +5059,7 @@ find_pattern_in_path(
|
||||
}
|
||||
save_char = p[i];
|
||||
p[i] = NUL;
|
||||
msg_outtrans_attr(p, hl_attr(HLF_D));
|
||||
msg_outtrans_attr(p, HL_ATTR(HLF_D));
|
||||
p[i] = save_char;
|
||||
}
|
||||
|
||||
@ -5124,7 +5124,7 @@ find_pattern_in_path(
|
||||
vim_snprintf((char*)IObuff, IOSIZE,
|
||||
_("Scanning included file: %s"),
|
||||
(char *)new_fname);
|
||||
msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
||||
msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -5572,7 +5572,7 @@ show_pat_in_path(
|
||||
msg_puts(IObuff);
|
||||
sprintf((char *)IObuff, "%4ld", *lnum); /* show line nr */
|
||||
/* Highlight line numbers */
|
||||
msg_puts_attr(IObuff, hl_attr(HLF_N));
|
||||
msg_puts_attr(IObuff, HL_ATTR(HLF_N));
|
||||
MSG_PUTS(" ");
|
||||
}
|
||||
msg_prt_line(line, FALSE);
|
||||
|
16
src/syntax.c
16
src/syntax.c
@ -4070,7 +4070,7 @@ syn_list_one(
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
attr = hl_attr(HLF_D); /* highlight like directories */
|
||||
attr = HL_ATTR(HLF_D); /* highlight like directories */
|
||||
|
||||
/* list the keywords for "id" */
|
||||
if (!syncing)
|
||||
@ -4181,11 +4181,11 @@ syn_list_cluster(int id)
|
||||
if (SYN_CLSTR(curwin->w_s)[id].scl_list != NULL)
|
||||
{
|
||||
put_id_list((char_u *)"cluster", SYN_CLSTR(curwin->w_s)[id].scl_list,
|
||||
hl_attr(HLF_D));
|
||||
HL_ATTR(HLF_D));
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_puts_attr((char_u *)"cluster", hl_attr(HLF_D));
|
||||
msg_puts_attr((char_u *)"cluster", HL_ATTR(HLF_D));
|
||||
msg_puts((char_u *)"=NONE");
|
||||
}
|
||||
}
|
||||
@ -8999,7 +8999,7 @@ highlight_list_one(int id)
|
||||
{
|
||||
(void)syn_list_header(didh, 9999, id);
|
||||
didh = TRUE;
|
||||
msg_puts_attr((char_u *)"links to", hl_attr(HLF_D));
|
||||
msg_puts_attr((char_u *)"links to", HL_ATTR(HLF_D));
|
||||
msg_putchar(' ');
|
||||
msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
|
||||
}
|
||||
@ -9056,8 +9056,8 @@ highlight_list_arg(
|
||||
{
|
||||
if (*name != NUL)
|
||||
{
|
||||
MSG_PUTS_ATTR(name, hl_attr(HLF_D));
|
||||
MSG_PUTS_ATTR("=", hl_attr(HLF_D));
|
||||
MSG_PUTS_ATTR(name, HL_ATTR(HLF_D));
|
||||
MSG_PUTS_ATTR("=", HL_ATTR(HLF_D));
|
||||
}
|
||||
msg_outtrans(ts);
|
||||
}
|
||||
@ -9457,7 +9457,7 @@ syn_add_group(char_u *name)
|
||||
{
|
||||
/* This is an error, but since there previously was no check only
|
||||
* give a warning. */
|
||||
msg_source(hl_attr(HLF_W));
|
||||
msg_source(HL_ATTR(HLF_W));
|
||||
MSG(_("W18: Invalid character in group name"));
|
||||
break;
|
||||
}
|
||||
@ -9932,7 +9932,7 @@ highlight_list(void)
|
||||
int i;
|
||||
|
||||
for (i = 10; --i >= 0; )
|
||||
highlight_list_two(i, hl_attr(HLF_D));
|
||||
highlight_list_two(i, HL_ATTR(HLF_D));
|
||||
for (i = 40; --i >= 0; )
|
||||
highlight_list_two(99, 0);
|
||||
}
|
||||
|
14
src/tag.c
14
src/tag.c
@ -605,10 +605,10 @@ do_tag(
|
||||
if (msg_col == 0)
|
||||
msg_didout = FALSE; /* overwrite previous message */
|
||||
msg_start();
|
||||
MSG_PUTS_ATTR(_(" # pri kind tag"), hl_attr(HLF_T));
|
||||
MSG_PUTS_ATTR(_(" # pri kind tag"), HL_ATTR(HLF_T));
|
||||
msg_clr_eos();
|
||||
taglen_advance(taglen);
|
||||
MSG_PUTS_ATTR(_("file\n"), hl_attr(HLF_T));
|
||||
MSG_PUTS_ATTR(_("file\n"), HL_ATTR(HLF_T));
|
||||
|
||||
for (i = 0; i < num_matches && !got_int; ++i)
|
||||
{
|
||||
@ -633,7 +633,7 @@ do_tag(
|
||||
msg_advance(13);
|
||||
msg_outtrans_len_attr(tagp.tagname,
|
||||
(int)(tagp.tagname_end - tagp.tagname),
|
||||
hl_attr(HLF_T));
|
||||
HL_ATTR(HLF_T));
|
||||
msg_putchar(' ');
|
||||
taglen_advance(taglen);
|
||||
|
||||
@ -642,7 +642,7 @@ do_tag(
|
||||
p = tag_full_fname(&tagp);
|
||||
if (p != NULL)
|
||||
{
|
||||
msg_puts_long_attr(p, hl_attr(HLF_D));
|
||||
msg_puts_long_attr(p, HL_ATTR(HLF_D));
|
||||
vim_free(p);
|
||||
}
|
||||
if (msg_col > 0)
|
||||
@ -677,7 +677,7 @@ do_tag(
|
||||
continue;
|
||||
}
|
||||
/* print all other extra fields */
|
||||
attr = hl_attr(HLF_CM);
|
||||
attr = HL_ATTR(HLF_CM);
|
||||
while (*p && *p != '\r' && *p != '\n')
|
||||
{
|
||||
if (msg_col + ptr2cells(p) >= Columns)
|
||||
@ -1003,7 +1003,7 @@ do_tag(
|
||||
&& num_matches > 1)
|
||||
{
|
||||
if (ic)
|
||||
msg_attr(IObuff, hl_attr(HLF_W));
|
||||
msg_attr(IObuff, HL_ATTR(HLF_W));
|
||||
else
|
||||
msg(IObuff);
|
||||
msg_scroll = TRUE; /* don't overwrite this message */
|
||||
@ -1140,7 +1140,7 @@ do_tags(exarg_T *eap UNUSED)
|
||||
tagstack[i].fmark.mark.lnum);
|
||||
msg_outtrans(IObuff);
|
||||
msg_outtrans_attr(name, tagstack[i].fmark.fnum == curbuf->b_fnum
|
||||
? hl_attr(HLF_D) : 0);
|
||||
? HL_ATTR(HLF_D) : 0);
|
||||
vim_free(name);
|
||||
}
|
||||
out_flush(); /* show one line at a time */
|
||||
|
10
src/term.c
10
src/term.c
@ -1565,9 +1565,9 @@ set_termname(char_u *term)
|
||||
/* get output strings */
|
||||
for (i = 0; string_names[i].name != NULL; ++i)
|
||||
{
|
||||
if (term_str(string_names[i].dest) == NULL
|
||||
|| term_str(string_names[i].dest) == empty_option)
|
||||
term_str(string_names[i].dest) =
|
||||
if (TERM_STR(string_names[i].dest) == NULL
|
||||
|| TERM_STR(string_names[i].dest) == empty_option)
|
||||
TERM_STR(string_names[i].dest) =
|
||||
TGETSTR(string_names[i].name, &tp);
|
||||
}
|
||||
|
||||
@ -1619,8 +1619,8 @@ set_termname(char_u *term)
|
||||
/*
|
||||
* Get number of colors (if not done already).
|
||||
*/
|
||||
if (term_str(KS_CCO) == NULL
|
||||
|| term_str(KS_CCO) == empty_option)
|
||||
if (TERM_STR(KS_CCO) == NULL
|
||||
|| TERM_STR(KS_CCO) == empty_option)
|
||||
set_color_count(tgetnum("Co"));
|
||||
|
||||
# ifndef hpux
|
||||
|
138
src/term.h
138
src/term.h
@ -92,8 +92,8 @@ enum SpecialKey
|
||||
KS_8B, /* set background color (RGB) */
|
||||
KS_CBE, /* enable bracketed paste mode */
|
||||
KS_CBD, /* disable bracketed paste mode */
|
||||
KS_CPS, /* start of brackted paste */
|
||||
KS_CPE /* end of brackted paste */
|
||||
KS_CPS, /* start of bracketed paste */
|
||||
KS_CPE /* end of bracketed paste */
|
||||
};
|
||||
|
||||
#define KS_LAST KS_CPE
|
||||
@ -111,73 +111,73 @@ extern char_u *(term_strings[]); /* current terminal strings */
|
||||
/*
|
||||
* strings used for terminal
|
||||
*/
|
||||
#define T_NAME (term_str(KS_NAME)) /* terminal name */
|
||||
#define T_CE (term_str(KS_CE)) /* clear to end of line */
|
||||
#define T_AL (term_str(KS_AL)) /* add new blank line */
|
||||
#define T_CAL (term_str(KS_CAL)) /* add number of blank lines */
|
||||
#define T_DL (term_str(KS_DL)) /* delete line */
|
||||
#define T_CDL (term_str(KS_CDL)) /* delete number of lines */
|
||||
#define T_CS (term_str(KS_CS)) /* scroll region */
|
||||
#define T_CSV (term_str(KS_CSV)) /* scroll region vertical */
|
||||
#define T_CL (term_str(KS_CL)) /* clear screen */
|
||||
#define T_CD (term_str(KS_CD)) /* clear to end of display */
|
||||
#define T_UT (term_str(KS_UT)) /* clearing uses background color */
|
||||
#define T_DA (term_str(KS_DA)) /* text may be scrolled down from up */
|
||||
#define T_DB (term_str(KS_DB)) /* text may be scrolled up from down */
|
||||
#define T_VI (term_str(KS_VI)) /* cursor invisible */
|
||||
#define T_VE (term_str(KS_VE)) /* cursor visible */
|
||||
#define T_VS (term_str(KS_VS)) /* cursor very visible */
|
||||
#define T_ME (term_str(KS_ME)) /* normal mode */
|
||||
#define T_MR (term_str(KS_MR)) /* reverse mode */
|
||||
#define T_MD (term_str(KS_MD)) /* bold mode */
|
||||
#define T_SE (term_str(KS_SE)) /* normal mode */
|
||||
#define T_SO (term_str(KS_SO)) /* standout mode */
|
||||
#define T_CZH (term_str(KS_CZH)) /* italic mode start */
|
||||
#define T_CZR (term_str(KS_CZR)) /* italic mode end */
|
||||
#define T_UE (term_str(KS_UE)) /* exit underscore (underline) mode */
|
||||
#define T_US (term_str(KS_US)) /* underscore (underline) mode */
|
||||
#define T_UCE (term_str(KS_UCE)) /* exit undercurl mode */
|
||||
#define T_UCS (term_str(KS_UCS)) /* undercurl mode */
|
||||
#define T_MS (term_str(KS_MS)) /* save to move cur in reverse mode */
|
||||
#define T_CM (term_str(KS_CM)) /* cursor motion */
|
||||
#define T_SR (term_str(KS_SR)) /* scroll reverse (backward) */
|
||||
#define T_CRI (term_str(KS_CRI)) /* cursor number of chars right */
|
||||
#define T_VB (term_str(KS_VB)) /* visual bell */
|
||||
#define T_KS (term_str(KS_KS)) /* put term in "keypad transmit" mode */
|
||||
#define T_KE (term_str(KS_KE)) /* out of "keypad transmit" mode */
|
||||
#define T_TI (term_str(KS_TI)) /* put terminal in termcap mode */
|
||||
#define T_TE (term_str(KS_TE)) /* out of termcap mode */
|
||||
#define T_BC (term_str(KS_BC)) /* backspace character */
|
||||
#define T_CCS (term_str(KS_CCS)) /* cur is relative to scroll region */
|
||||
#define T_CCO (term_str(KS_CCO)) /* number of colors */
|
||||
#define T_CSF (term_str(KS_CSF)) /* set foreground color */
|
||||
#define T_CSB (term_str(KS_CSB)) /* set background color */
|
||||
#define T_XS (term_str(KS_XS)) /* standout not erased by overwriting */
|
||||
#define T_XN (term_str(KS_XN)) /* newline glitch */
|
||||
#define T_MB (term_str(KS_MB)) /* blink mode */
|
||||
#define T_CAF (term_str(KS_CAF)) /* set foreground color (ANSI) */
|
||||
#define T_CAB (term_str(KS_CAB)) /* set background color (ANSI) */
|
||||
#define T_LE (term_str(KS_LE)) /* cursor left */
|
||||
#define T_ND (term_str(KS_ND)) /* cursor right */
|
||||
#define T_CIS (term_str(KS_CIS)) /* set icon text start */
|
||||
#define T_CIE (term_str(KS_CIE)) /* set icon text end */
|
||||
#define T_TS (term_str(KS_TS)) /* set window title start */
|
||||
#define T_FS (term_str(KS_FS)) /* set window title end */
|
||||
#define T_CWP (term_str(KS_CWP)) /* window position */
|
||||
#define T_CWS (term_str(KS_CWS)) /* window size */
|
||||
#define T_CSI (term_str(KS_CSI)) /* start insert mode */
|
||||
#define T_CEI (term_str(KS_CEI)) /* end insert mode */
|
||||
#define T_CSR (term_str(KS_CSR)) /* start replace mode */
|
||||
#define T_CRV (term_str(KS_CRV)) /* request version string */
|
||||
#define T_RBG (term_str(KS_RBG)) /* request background RGB */
|
||||
#define T_OP (term_str(KS_OP)) /* original color pair */
|
||||
#define T_U7 (term_str(KS_U7)) /* request cursor position */
|
||||
#define T_8F (term_str(KS_8F)) /* set foreground color (RGB) */
|
||||
#define T_8B (term_str(KS_8B)) /* set background color (RGB) */
|
||||
#define T_BE (term_str(KS_CBE)) /* enable bracketed paste mode */
|
||||
#define T_BD (term_str(KS_CBD)) /* disable bracketed paste mode */
|
||||
#define T_PS (term_str(KS_CPS)) /* start of bracketed paste */
|
||||
#define T_PE (term_str(KS_CPE)) /* end of bracketed paste */
|
||||
#define T_NAME (TERM_STR(KS_NAME)) /* terminal name */
|
||||
#define T_CE (TERM_STR(KS_CE)) /* clear to end of line */
|
||||
#define T_AL (TERM_STR(KS_AL)) /* add new blank line */
|
||||
#define T_CAL (TERM_STR(KS_CAL)) /* add number of blank lines */
|
||||
#define T_DL (TERM_STR(KS_DL)) /* delete line */
|
||||
#define T_CDL (TERM_STR(KS_CDL)) /* delete number of lines */
|
||||
#define T_CS (TERM_STR(KS_CS)) /* scroll region */
|
||||
#define T_CSV (TERM_STR(KS_CSV)) /* scroll region vertical */
|
||||
#define T_CL (TERM_STR(KS_CL)) /* clear screen */
|
||||
#define T_CD (TERM_STR(KS_CD)) /* clear to end of display */
|
||||
#define T_UT (TERM_STR(KS_UT)) /* clearing uses background color */
|
||||
#define T_DA (TERM_STR(KS_DA)) /* text may be scrolled down from up */
|
||||
#define T_DB (TERM_STR(KS_DB)) /* text may be scrolled up from down */
|
||||
#define T_VI (TERM_STR(KS_VI)) /* cursor invisible */
|
||||
#define T_VE (TERM_STR(KS_VE)) /* cursor visible */
|
||||
#define T_VS (TERM_STR(KS_VS)) /* cursor very visible */
|
||||
#define T_ME (TERM_STR(KS_ME)) /* normal mode */
|
||||
#define T_MR (TERM_STR(KS_MR)) /* reverse mode */
|
||||
#define T_MD (TERM_STR(KS_MD)) /* bold mode */
|
||||
#define T_SE (TERM_STR(KS_SE)) /* normal mode */
|
||||
#define T_SO (TERM_STR(KS_SO)) /* standout mode */
|
||||
#define T_CZH (TERM_STR(KS_CZH)) /* italic mode start */
|
||||
#define T_CZR (TERM_STR(KS_CZR)) /* italic mode end */
|
||||
#define T_UE (TERM_STR(KS_UE)) /* exit underscore (underline) mode */
|
||||
#define T_US (TERM_STR(KS_US)) /* underscore (underline) mode */
|
||||
#define T_UCE (TERM_STR(KS_UCE)) /* exit undercurl mode */
|
||||
#define T_UCS (TERM_STR(KS_UCS)) /* undercurl mode */
|
||||
#define T_MS (TERM_STR(KS_MS)) /* save to move cur in reverse mode */
|
||||
#define T_CM (TERM_STR(KS_CM)) /* cursor motion */
|
||||
#define T_SR (TERM_STR(KS_SR)) /* scroll reverse (backward) */
|
||||
#define T_CRI (TERM_STR(KS_CRI)) /* cursor number of chars right */
|
||||
#define T_VB (TERM_STR(KS_VB)) /* visual bell */
|
||||
#define T_KS (TERM_STR(KS_KS)) /* put term in "keypad transmit" mode */
|
||||
#define T_KE (TERM_STR(KS_KE)) /* out of "keypad transmit" mode */
|
||||
#define T_TI (TERM_STR(KS_TI)) /* put terminal in termcap mode */
|
||||
#define T_TE (TERM_STR(KS_TE)) /* out of termcap mode */
|
||||
#define T_BC (TERM_STR(KS_BC)) /* backspace character */
|
||||
#define T_CCS (TERM_STR(KS_CCS)) /* cur is relative to scroll region */
|
||||
#define T_CCO (TERM_STR(KS_CCO)) /* number of colors */
|
||||
#define T_CSF (TERM_STR(KS_CSF)) /* set foreground color */
|
||||
#define T_CSB (TERM_STR(KS_CSB)) /* set background color */
|
||||
#define T_XS (TERM_STR(KS_XS)) /* standout not erased by overwriting */
|
||||
#define T_XN (TERM_STR(KS_XN)) /* newline glitch */
|
||||
#define T_MB (TERM_STR(KS_MB)) /* blink mode */
|
||||
#define T_CAF (TERM_STR(KS_CAF)) /* set foreground color (ANSI) */
|
||||
#define T_CAB (TERM_STR(KS_CAB)) /* set background color (ANSI) */
|
||||
#define T_LE (TERM_STR(KS_LE)) /* cursor left */
|
||||
#define T_ND (TERM_STR(KS_ND)) /* cursor right */
|
||||
#define T_CIS (TERM_STR(KS_CIS)) /* set icon text start */
|
||||
#define T_CIE (TERM_STR(KS_CIE)) /* set icon text end */
|
||||
#define T_TS (TERM_STR(KS_TS)) /* set window title start */
|
||||
#define T_FS (TERM_STR(KS_FS)) /* set window title end */
|
||||
#define T_CWP (TERM_STR(KS_CWP)) /* window position */
|
||||
#define T_CWS (TERM_STR(KS_CWS)) /* window size */
|
||||
#define T_CSI (TERM_STR(KS_CSI)) /* start insert mode */
|
||||
#define T_CEI (TERM_STR(KS_CEI)) /* end insert mode */
|
||||
#define T_CSR (TERM_STR(KS_CSR)) /* start replace mode */
|
||||
#define T_CRV (TERM_STR(KS_CRV)) /* request version string */
|
||||
#define T_RBG (TERM_STR(KS_RBG)) /* request background RGB */
|
||||
#define T_OP (TERM_STR(KS_OP)) /* original color pair */
|
||||
#define T_U7 (TERM_STR(KS_U7)) /* request cursor position */
|
||||
#define T_8F (TERM_STR(KS_8F)) /* set foreground color (RGB) */
|
||||
#define T_8B (TERM_STR(KS_8B)) /* set background color (RGB) */
|
||||
#define T_BE (TERM_STR(KS_CBE)) /* enable bracketed paste mode */
|
||||
#define T_BD (TERM_STR(KS_CBD)) /* disable bracketed paste mode */
|
||||
#define T_PS (TERM_STR(KS_CPS)) /* start of bracketed paste */
|
||||
#define T_PE (TERM_STR(KS_CPE)) /* end of bracketed paste */
|
||||
|
||||
#define TMODE_COOK 0 /* terminal mode for external cmds and Ex mode */
|
||||
#define TMODE_SLEEP 1 /* terminal mode for sleeping (cooked but no echo) */
|
||||
|
4
src/ui.c
4
src/ui.c
@ -496,7 +496,7 @@ clip_own_selection(VimClipboard *cbd)
|
||||
|| get_real_state() == SELECTMODE)
|
||||
&& (cbd == &clip_star ? clip_isautosel_star()
|
||||
: clip_isautosel_plus())
|
||||
&& hl_attr(HLF_V) != hl_attr(HLF_VNC))
|
||||
&& HL_ATTR(HLF_V) != HL_ATTR(HLF_VNC))
|
||||
redraw_curbuf_later(INVERTED_ALL);
|
||||
}
|
||||
}
|
||||
@ -534,7 +534,7 @@ clip_lose_selection(VimClipboard *cbd)
|
||||
|| get_real_state() == SELECTMODE)
|
||||
&& (cbd == &clip_star ?
|
||||
clip_isautosel_star() : clip_isautosel_plus())
|
||||
&& hl_attr(HLF_V) != hl_attr(HLF_VNC))
|
||||
&& HL_ATTR(HLF_V) != HL_ATTR(HLF_VNC))
|
||||
{
|
||||
update_curbuf(INVERTED_ALL);
|
||||
setcursor();
|
||||
|
@ -3079,7 +3079,7 @@ ex_undolist(exarg_T *eap UNUSED)
|
||||
|
||||
msg_start();
|
||||
msg_puts_attr((char_u *)_("number changes when saved"),
|
||||
hl_attr(HLF_T));
|
||||
HL_ATTR(HLF_T));
|
||||
for (i = 0; i < ga.ga_len && !got_int; ++i)
|
||||
{
|
||||
msg_putchar('\n');
|
||||
|
@ -1494,7 +1494,7 @@ list_func_head(ufunc_T *fp, int indent)
|
||||
MSG_PUTS("function ");
|
||||
if (fp->uf_name[0] == K_SPECIAL)
|
||||
{
|
||||
MSG_PUTS_ATTR("<SNR>", hl_attr(HLF_8));
|
||||
MSG_PUTS_ATTR("<SNR>", HL_ATTR(HLF_8));
|
||||
msg_puts(fp->uf_name + 3);
|
||||
}
|
||||
else
|
||||
|
@ -764,6 +764,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
466,
|
||||
/**/
|
||||
465,
|
||||
/**/
|
||||
@ -2321,7 +2323,7 @@ do_intro_line(
|
||||
#endif
|
||||
clen += byte2cells(p[l]);
|
||||
}
|
||||
screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr);
|
||||
screen_puts_len(p, l, row, col, *p == '<' ? HL_ATTR(HLF_8) : attr);
|
||||
col += clen;
|
||||
}
|
||||
|
||||
|
13
src/vim.h
13
src/vim.h
@ -1761,8 +1761,8 @@ void *vim_memset(void *, int, size_t);
|
||||
/*
|
||||
* Enums need a typecast to be used as array index (for Ultrix).
|
||||
*/
|
||||
#define hl_attr(n) highlight_attr[(int)(n)]
|
||||
#define term_str(n) term_strings[(int)(n)]
|
||||
#define HL_ATTR(n) highlight_attr[(int)(n)]
|
||||
#define TERM_STR(n) term_strings[(int)(n)]
|
||||
|
||||
/*
|
||||
* EXTERN is only defined in main.c. That's where global variables are
|
||||
@ -2076,13 +2076,6 @@ typedef struct VimClipboard
|
||||
typedef int VimClipboard; /* This is required for the prototypes. */
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
/* work around a bug in the Borland 'stat' function: */
|
||||
# include <io.h> /* for access() */
|
||||
|
||||
# define stat(a,b) (access(a,0) ? -1 : stat(a,b))
|
||||
#endif
|
||||
|
||||
/* Use 64-bit stat structure if available. */
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
|
||||
# define HAVE_STAT64
|
||||
@ -2140,7 +2133,7 @@ typedef enum {
|
||||
#include "globals.h" /* global variables and messages */
|
||||
|
||||
#ifndef FEAT_VIRTUALEDIT
|
||||
# define getvvcol(w, p, s, c, e) getvcol(w, p, s, c, e)
|
||||
# define getvvcol(w, p, s, c, e) getvcol((w), (p), (s), (c), (e))
|
||||
# define virtual_active() FALSE
|
||||
# define virtual_op FALSE
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user