Karsten Hopp ce7b7f
To: vim-dev@vim.org
Karsten Hopp ce7b7f
Subject: Patch 7.0.124
Karsten Hopp ce7b7f
Fcc: outbox
Karsten Hopp ce7b7f
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp ce7b7f
Mime-Version: 1.0
Karsten Hopp ce7b7f
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp ce7b7f
Content-Transfer-Encoding: 8bit
Karsten Hopp ce7b7f
------------
Karsten Hopp ce7b7f
Karsten Hopp ce7b7f
Patch 7.0.124
Karsten Hopp ce7b7f
Problem:    getwinvar() obtains a dictionary with window-local variables, but
Karsten Hopp ce7b7f
	    it's always for the current window.
Karsten Hopp ce7b7f
Solution:   Get the variables of the specified window. (Geoff Reedy)
Karsten Hopp ce7b7f
Files:	    src/eval.c
Karsten Hopp ce7b7f
Karsten Hopp ce7b7f
Karsten Hopp ce7b7f
*** ../vim-7.0.123/src/eval.c	Tue Oct  3 14:43:31 2006
Karsten Hopp ce7b7f
--- src/eval.c	Fri Oct  6 21:08:57 2006
Karsten Hopp ce7b7f
***************
Karsten Hopp ce7b7f
*** 10432,10451 ****
Karsten Hopp ce7b7f
  
Karsten Hopp ce7b7f
      if (win != NULL && varname != NULL)
Karsten Hopp ce7b7f
      {
Karsten Hopp ce7b7f
! 	if (*varname == '&')	/* window-local-option */
Karsten Hopp ce7b7f
! 	{
Karsten Hopp ce7b7f
! 	    /* Set curwin to be our win, temporarily.  Also set curbuf, so
Karsten Hopp ce7b7f
! 	     * that we can get buffer-local options. */
Karsten Hopp ce7b7f
! 	    oldcurwin = curwin;
Karsten Hopp ce7b7f
! 	    curwin = win;
Karsten Hopp ce7b7f
! 	    curbuf = win->w_buffer;
Karsten Hopp ce7b7f
  
Karsten Hopp ce7b7f
  	    get_option_tv(&varname, rettv, 1);
Karsten Hopp ce7b7f
- 
Karsten Hopp ce7b7f
- 	    /* restore previous notion of curwin */
Karsten Hopp ce7b7f
- 	    curwin = oldcurwin;
Karsten Hopp ce7b7f
- 	    curbuf = curwin->w_buffer;
Karsten Hopp ce7b7f
- 	}
Karsten Hopp ce7b7f
  	else
Karsten Hopp ce7b7f
  	{
Karsten Hopp ce7b7f
  	    if (*varname == NUL)
Karsten Hopp ce7b7f
--- 10432,10445 ----
Karsten Hopp ce7b7f
  
Karsten Hopp ce7b7f
      if (win != NULL && varname != NULL)
Karsten Hopp ce7b7f
      {
Karsten Hopp ce7b7f
! 	/* Set curwin to be our win, temporarily.  Also set curbuf, so
Karsten Hopp ce7b7f
! 	 * that we can get buffer-local options. */
Karsten Hopp ce7b7f
! 	oldcurwin = curwin;
Karsten Hopp ce7b7f
! 	curwin = win;
Karsten Hopp ce7b7f
! 	curbuf = win->w_buffer;
Karsten Hopp ce7b7f
  
Karsten Hopp ce7b7f
+ 	if (*varname == '&')	/* window-local-option */
Karsten Hopp ce7b7f
  	    get_option_tv(&varname, rettv, 1);
Karsten Hopp ce7b7f
  	else
Karsten Hopp ce7b7f
  	{
Karsten Hopp ce7b7f
  	    if (*varname == NUL)
Karsten Hopp ce7b7f
***************
Karsten Hopp ce7b7f
*** 10458,10463 ****
Karsten Hopp ce7b7f
--- 10452,10461 ----
Karsten Hopp ce7b7f
  	    if (v != NULL)
Karsten Hopp ce7b7f
  		copy_tv(&v->di_tv, rettv);
Karsten Hopp ce7b7f
  	}
Karsten Hopp ce7b7f
+ 
Karsten Hopp ce7b7f
+ 	/* restore previous notion of curwin */
Karsten Hopp ce7b7f
+ 	curwin = oldcurwin;
Karsten Hopp ce7b7f
+ 	curbuf = curwin->w_buffer;
Karsten Hopp ce7b7f
      }
Karsten Hopp ce7b7f
  
Karsten Hopp ce7b7f
      --emsg_off;
Karsten Hopp ce7b7f
*** ../vim-7.0.123/src/version.c	Tue Oct 10 11:41:44 2006
Karsten Hopp ce7b7f
--- src/version.c	Tue Oct 10 12:53:15 2006
Karsten Hopp ce7b7f
***************
Karsten Hopp ce7b7f
*** 668,669 ****
Karsten Hopp ce7b7f
--- 668,671 ----
Karsten Hopp ce7b7f
  {   /* Add new patch number below this line */
Karsten Hopp ce7b7f
+ /**/
Karsten Hopp ce7b7f
+     124,
Karsten Hopp ce7b7f
  /**/
Karsten Hopp ce7b7f
Karsten Hopp ce7b7f
-- 
Karsten Hopp ce7b7f
How To Keep A Healthy Level Of Insanity:
Karsten Hopp ce7b7f
14. Put mosquito netting around your work area. Play a tape of jungle
Karsten Hopp ce7b7f
    sounds all day.
Karsten Hopp ce7b7f
Karsten Hopp ce7b7f
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp ce7b7f
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp ce7b7f
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp ce7b7f
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///