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