lkundrak / rpms / vim

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