mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.0222
This commit is contained in:
@@ -288,7 +288,7 @@ save_re_pat(idx, pat, magic)
|
|||||||
#ifdef FEAT_SEARCH_EXTRA
|
#ifdef FEAT_SEARCH_EXTRA
|
||||||
/* If 'hlsearch' set and search pat changed: need redraw. */
|
/* If 'hlsearch' set and search pat changed: need redraw. */
|
||||||
if (p_hls)
|
if (p_hls)
|
||||||
redraw_all_later(NOT_VALID);
|
redraw_all_later(SOME_VALID);
|
||||||
no_hlsearch = FALSE;
|
no_hlsearch = FALSE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -450,7 +450,7 @@ set_last_search_pat(s, idx, magic, setlast)
|
|||||||
# ifdef FEAT_SEARCH_EXTRA
|
# ifdef FEAT_SEARCH_EXTRA
|
||||||
/* If 'hlsearch' set and search pat changed: need redraw. */
|
/* If 'hlsearch' set and search pat changed: need redraw. */
|
||||||
if (p_hls && idx == last_idx && !no_hlsearch)
|
if (p_hls && idx == last_idx && !no_hlsearch)
|
||||||
redraw_all_later(NOT_VALID);
|
redraw_all_later(SOME_VALID);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1032,7 +1032,7 @@ do_search(oap, dirc, pat, count, options)
|
|||||||
*/
|
*/
|
||||||
if (no_hlsearch && !(options & SEARCH_KEEP))
|
if (no_hlsearch && !(options & SEARCH_KEEP))
|
||||||
{
|
{
|
||||||
redraw_all_later(NOT_VALID);
|
redraw_all_later(SOME_VALID);
|
||||||
no_hlsearch = FALSE;
|
no_hlsearch = FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
49
src/syntax.c
49
src/syntax.c
@@ -3395,7 +3395,7 @@ syn_cmd_clear(eap, syncing)
|
|||||||
arg = skipwhite(arg_end);
|
arg = skipwhite(arg_end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
redraw_curbuf_later(NOT_VALID);
|
redraw_curbuf_later(SOME_VALID);
|
||||||
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4560,7 +4560,7 @@ syn_cmd_keyword(eap, syncing)
|
|||||||
else
|
else
|
||||||
EMSG2(_(e_invarg2), arg);
|
EMSG2(_(e_invarg2), arg);
|
||||||
|
|
||||||
redraw_curbuf_later(NOT_VALID);
|
redraw_curbuf_later(SOME_VALID);
|
||||||
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4646,7 +4646,7 @@ syn_cmd_match(eap, syncing)
|
|||||||
++curbuf->b_syn_folditems;
|
++curbuf->b_syn_folditems;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
redraw_curbuf_later(NOT_VALID);
|
redraw_curbuf_later(SOME_VALID);
|
||||||
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
||||||
return; /* don't free the progs and patterns now */
|
return; /* don't free the progs and patterns now */
|
||||||
}
|
}
|
||||||
@@ -4893,7 +4893,7 @@ syn_cmd_region(eap, syncing)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
redraw_curbuf_later(NOT_VALID);
|
redraw_curbuf_later(SOME_VALID);
|
||||||
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
||||||
success = TRUE; /* don't free the progs and patterns now */
|
success = TRUE; /* don't free the progs and patterns now */
|
||||||
}
|
}
|
||||||
@@ -5250,7 +5250,7 @@ syn_cmd_cluster(eap, syncing)
|
|||||||
|
|
||||||
if (got_clstr)
|
if (got_clstr)
|
||||||
{
|
{
|
||||||
redraw_curbuf_later(NOT_VALID);
|
redraw_curbuf_later(SOME_VALID);
|
||||||
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5519,7 +5519,7 @@ syn_cmd_sync(eap, syncing)
|
|||||||
else if (!finished)
|
else if (!finished)
|
||||||
{
|
{
|
||||||
eap->nextcmd = check_nextcmd(arg_start);
|
eap->nextcmd = check_nextcmd(arg_start);
|
||||||
redraw_curbuf_later(NOT_VALID);
|
redraw_curbuf_later(SOME_VALID);
|
||||||
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
syn_stack_free_all(curbuf); /* Need to recompute all syntax. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6113,6 +6113,8 @@ static char *(highlight_init_light[]) =
|
|||||||
"DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta",
|
"DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta",
|
||||||
"DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan",
|
"DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan",
|
||||||
"TabLine term=underline cterm=underline ctermfg=black ctermbg=LightGrey gui=underline guibg=LightGrey",
|
"TabLine term=underline cterm=underline ctermfg=black ctermbg=LightGrey gui=underline guibg=LightGrey",
|
||||||
|
"CursorColumn term=reverse ctermbg=LightGrey guibg=LightGrey",
|
||||||
|
"CursorLine term=underline cterm=underline guibg=LightGrey",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -6142,6 +6144,8 @@ static char *(highlight_init_dark[]) =
|
|||||||
"DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta",
|
"DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta",
|
||||||
"DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan",
|
"DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan",
|
||||||
"TabLine term=underline cterm=underline ctermfg=white ctermbg=DarkGrey gui=underline guibg=DarkGrey",
|
"TabLine term=underline cterm=underline ctermfg=white ctermbg=DarkGrey gui=underline guibg=DarkGrey",
|
||||||
|
"CursorColumn term=reverse ctermbg=DarkGrey guibg=DarkGrey",
|
||||||
|
"CursorLine term=underline cterm=underline guibg=DarkGrey",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -6391,7 +6395,7 @@ do_highlight(line, forceit, init)
|
|||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
HL_TABLE()[from_id - 1].sg_scriptID = current_SID;
|
HL_TABLE()[from_id - 1].sg_scriptID = current_SID;
|
||||||
#endif
|
#endif
|
||||||
redraw_all_later(NOT_VALID);
|
redraw_all_later(SOME_VALID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7143,7 +7147,7 @@ do_highlight(line, forceit, init)
|
|||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
HL_TABLE()[idx].sg_scriptID = current_SID;
|
HL_TABLE()[idx].sg_scriptID = current_SID;
|
||||||
#endif
|
#endif
|
||||||
redraw_all_later(NOT_VALID);
|
redraw_all_later(SOME_VALID);
|
||||||
}
|
}
|
||||||
vim_free(key);
|
vim_free(key);
|
||||||
vim_free(arg);
|
vim_free(arg);
|
||||||
@@ -7719,7 +7723,7 @@ clear_hl_tables()
|
|||||||
ga_clear(&cterm_attr_table);
|
ga_clear(&cterm_attr_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(FEAT_SYN_HL) || defined(PROTO)
|
#if defined(FEAT_SYN_HL) || defined(FEAT_SPELL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Combine special attributes (e.g., for spelling) with other attributes
|
* Combine special attributes (e.g., for spelling) with other attributes
|
||||||
* (e.g., for syntax highlighting).
|
* (e.g., for syntax highlighting).
|
||||||
@@ -7856,9 +7860,34 @@ syn_gui_attr2entry(attr)
|
|||||||
return NULL;
|
return NULL;
|
||||||
return &(GUI_ATTR_ENTRY(attr));
|
return &(GUI_ATTR_ENTRY(attr));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FEAT_GUI */
|
#endif /* FEAT_GUI */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the highlight attributes (HL_BOLD etc.) from an attribute nr.
|
||||||
|
* Only to be used when "attr" > HL_ALL.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
syn_attr2attr(attr)
|
||||||
|
int attr;
|
||||||
|
{
|
||||||
|
attrentry_T *aep;
|
||||||
|
|
||||||
|
#ifdef FEAT_GUI
|
||||||
|
if (gui.in_use)
|
||||||
|
aep = syn_gui_attr2entry(attr);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
if (t_colors > 1)
|
||||||
|
aep = syn_cterm_attr2entry(attr);
|
||||||
|
else
|
||||||
|
aep = syn_term_attr2entry(attr);
|
||||||
|
|
||||||
|
if (aep == NULL) /* highlighting not set */
|
||||||
|
return 0;
|
||||||
|
return aep->ae_attr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
attrentry_T *
|
attrentry_T *
|
||||||
syn_term_attr2entry(attr)
|
syn_term_attr2entry(attr)
|
||||||
int attr;
|
int attr;
|
||||||
|
Reference in New Issue
Block a user