To: vim_dev@googlegroups.com Subject: Patch 7.4.537 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.537 Problem: Value of v:hlsearch reflects an internal variable. Solution: Make the value reflect whether search highlighting is actually displayed. (Christian Brabandt) Files: runtime/doc/eval.txt, src/testdir/test101.in, src/testdir/test101.ok, src/vim.h *** ../vim-7.4.536/runtime/doc/eval.txt 2014-11-05 18:05:48.652441306 +0100 --- runtime/doc/eval.txt 2014-11-27 19:05:43.646912096 +0100 *************** *** 1457,1466 **** Read-only in the |sandbox|. |fold-foldtext| *v:hlsearch* *hlsearch-variable* ! v:hlsearch Variable that determines whether search highlighting is on. ! Makes sense only if 'hlsearch' is enabled which requires ! |+extra_search|. Setting this variable to zero acts the like ! |:nohlsearch| command, setting it to one acts like > let &hlsearch = &hlsearch < *v:insertmode* *insertmode-variable* --- 1457,1466 ---- Read-only in the |sandbox|. |fold-foldtext| *v:hlsearch* *hlsearch-variable* ! v:hlsearch Variable that indicates whether search highlighting is on. ! Setting it makes sense only if 'hlsearch' is enabled which ! requires |+extra_search|. Setting this variable to zero acts ! the like |:nohlsearch| command, setting it to one acts like > let &hlsearch = &hlsearch < *v:insertmode* *insertmode-variable* *** ../vim-7.4.536/src/testdir/test101.in 2013-11-08 04:30:06.000000000 +0100 --- src/testdir/test101.in 2014-11-27 19:07:09.509965031 +0100 *************** *** 25,30 **** --- 25,33 ---- :AddR / :AddR + :set nohls + / + :AddR :let r1=r[0][0] :" I guess it is not guaranteed that screenattr outputs always the same character :call map(r, 'v:val[1].":".(v:val[0]==r1?"highlighted":"not highlighted")') *** ../vim-7.4.536/src/testdir/test101.ok 2013-11-08 04:30:06.000000000 +0100 --- src/testdir/test101.ok 2014-11-27 19:07:09.509965031 +0100 *************** *** 8,11 **** --- 8,12 ---- 1:highlighted 0:not highlighted 1:highlighted + 0:not highlighted Vim(let):E706: *** ../vim-7.4.536/src/vim.h 2014-08-29 12:58:38.246430208 +0200 --- src/vim.h 2014-11-27 19:07:09.509965031 +0100 *************** *** 1998,2004 **** #ifndef FEAT_VIRTUALEDIT # define getvvcol(w, p, s, c, e) getvcol(w, p, s, c, e) ! # define virtual_active() 0 # define virtual_op FALSE #endif --- 1998,2004 ---- #ifndef FEAT_VIRTUALEDIT # define getvvcol(w, p, s, c, e) getvcol(w, p, s, c, e) ! # define virtual_active() FALSE # define virtual_op FALSE #endif *************** *** 2277,2283 **** #define AUTOLOAD_CHAR '#' #ifdef FEAT_EVAL ! # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag); set_vim_var_nr(VV_HLSEARCH, !no_hlsearch) #else # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag) #endif --- 2277,2283 ---- #define AUTOLOAD_CHAR '#' #ifdef FEAT_EVAL ! # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag); set_vim_var_nr(VV_HLSEARCH, !no_hlsearch && p_hls) #else # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag) #endif *** ../vim-7.4.536/src/version.c 2014-11-27 18:57:07.472605147 +0100 --- src/version.c 2014-11-27 19:07:39.973629032 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 537, /**/ -- A M00se once bit my sister ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///