diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-11-08 04:30:20 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-11-08 04:30:20 +0100 |
commit | 8050efa07d7a66e8e2e88253d079a106a7f2601a (patch) | |
tree | 237a229f5815f2a54523b6122691b52dd2d0cadb /src/eval.c | |
parent | e5878f4be9f0cb6719220fa17f113fa24b1f3039 (diff) | |
download | vim-git-8050efa07d7a66e8e2e88253d079a106a7f2601a.tar.gz |
updated for version 7.4.079v7.4.079
Problem: A script cannot detect whether 'hlsearch' highlighting is actually
displayed.
Solution: Add the "v:hlsearch" variable. (ZyX)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 14ba4d8b2..9fbef244c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -356,6 +356,7 @@ static struct vimvar {VV_NAME("mouse_col", VAR_NUMBER), 0}, {VV_NAME("operator", VAR_STRING), VV_RO}, {VV_NAME("searchforward", VAR_NUMBER), 0}, + {VV_NAME("hlsearch", VAR_NUMBER), 0}, {VV_NAME("oldfiles", VAR_LIST), 0}, {VV_NAME("windowid", VAR_NUMBER), VV_RO}, }; @@ -871,6 +872,7 @@ eval_init() hash_add(&compat_hashtab, p->vv_di.di_key); } set_vim_var_nr(VV_SEARCHFORWARD, 1L); + set_vim_var_nr(VV_HLSEARCH, 1L); set_reg_var(0); /* default for v:register is not 0 but '"' */ #ifdef EBCDIC @@ -20613,6 +20615,13 @@ set_var(name, tv, copy) v->di_tv.vval.v_number = get_tv_number(tv); if (STRCMP(varname, "searchforward") == 0) set_search_direction(v->di_tv.vval.v_number ? '/' : '?'); +#ifdef FEAT_SEARCH_EXTRA + else if (STRCMP(varname, "hlsearch") == 0) + { + no_hlsearch = !v->di_tv.vval.v_number; + redraw_all_later(SOME_VALID); + } +#endif } return; } |