Karsten Hopp f0abbd
To: vim-dev@vim.org
Karsten Hopp f0abbd
Subject: Patch 7.2.103
Karsten Hopp f0abbd
Fcc: outbox
Karsten Hopp f0abbd
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f0abbd
Mime-Version: 1.0
Karsten Hopp f0abbd
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp f0abbd
Content-Transfer-Encoding: 8bit
Karsten Hopp f0abbd
------------
Karsten Hopp f0abbd
Karsten Hopp f0abbd
Patch 7.2.103
Karsten Hopp f0abbd
Problem:    When 'bomb' is changed the window title is updated to show/hide a
Karsten Hopp f0abbd
	    "+", but the tab page label isn't. (Patrick Texier)
Karsten Hopp f0abbd
Solution:   Set "redraw_tabline" in most places where "need_maketitle" is set.
Karsten Hopp f0abbd
	    (partly by Lech Lorens)
Karsten Hopp f0abbd
Files:	    src/option.c
Karsten Hopp f0abbd
Karsten Hopp f0abbd
Karsten Hopp f0abbd
*** ../vim-7.2.102/src/option.c	Wed Feb  4 17:27:50 2009
Karsten Hopp f0abbd
--- src/option.c	Wed Feb  4 17:40:02 2009
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 5268,5273 ****
Karsten Hopp f0abbd
--- 5268,5288 ----
Karsten Hopp f0abbd
  }
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
+ #ifdef FEAT_TITLE
Karsten Hopp f0abbd
+ static void redraw_titles __ARGS((void));
Karsten Hopp f0abbd
+ 
Karsten Hopp f0abbd
+ /*
Karsten Hopp f0abbd
+  * Redraw the window title and/or tab page text later.
Karsten Hopp f0abbd
+  */
Karsten Hopp f0abbd
+ static void redraw_titles()
Karsten Hopp f0abbd
+ {
Karsten Hopp f0abbd
+     need_maketitle = TRUE;
Karsten Hopp f0abbd
+ # ifdef FEAT_WINDOWS
Karsten Hopp f0abbd
+     redraw_tabline = TRUE;
Karsten Hopp f0abbd
+ # endif
Karsten Hopp f0abbd
+ }
Karsten Hopp f0abbd
+ #endif
Karsten Hopp f0abbd
+ 
Karsten Hopp f0abbd
  /*
Karsten Hopp f0abbd
   * Set a string option to a new value (without checking the effect).
Karsten Hopp f0abbd
   * The string is copied into allocated memory.
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 5672,5678 ****
Karsten Hopp f0abbd
  	    {
Karsten Hopp f0abbd
  # ifdef FEAT_TITLE
Karsten Hopp f0abbd
  		/* May show a "+" in the title now. */
Karsten Hopp f0abbd
! 		need_maketitle = TRUE;
Karsten Hopp f0abbd
  # endif
Karsten Hopp f0abbd
  		/* Add 'fileencoding' to the swap file. */
Karsten Hopp f0abbd
  		ml_setflags(curbuf);
Karsten Hopp f0abbd
--- 5687,5693 ----
Karsten Hopp f0abbd
  	    {
Karsten Hopp f0abbd
  # ifdef FEAT_TITLE
Karsten Hopp f0abbd
  		/* May show a "+" in the title now. */
Karsten Hopp f0abbd
! 		redraw_titles();
Karsten Hopp f0abbd
  # endif
Karsten Hopp f0abbd
  		/* Add 'fileencoding' to the swap file. */
Karsten Hopp f0abbd
  		ml_setflags(curbuf);
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 5691,5697 ****
Karsten Hopp f0abbd
  	    {
Karsten Hopp f0abbd
  		errmsg = mb_init();
Karsten Hopp f0abbd
  # ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 		need_maketitle = TRUE;
Karsten Hopp f0abbd
  # endif
Karsten Hopp f0abbd
  	    }
Karsten Hopp f0abbd
  	}
Karsten Hopp f0abbd
--- 5706,5712 ----
Karsten Hopp f0abbd
  	    {
Karsten Hopp f0abbd
  		errmsg = mb_init();
Karsten Hopp f0abbd
  # ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 		redraw_titles();
Karsten Hopp f0abbd
  # endif
Karsten Hopp f0abbd
  	    }
Karsten Hopp f0abbd
  	}
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 5800,5806 ****
Karsten Hopp f0abbd
  	    else
Karsten Hopp f0abbd
  		curbuf->b_p_tx = FALSE;
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 	    need_maketitle = TRUE;
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
  	    /* update flag in swap file */
Karsten Hopp f0abbd
  	    ml_setflags(curbuf);
Karsten Hopp f0abbd
--- 5815,5821 ----
Karsten Hopp f0abbd
  	    else
Karsten Hopp f0abbd
  		curbuf->b_p_tx = FALSE;
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 	    redraw_titles();
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
  	    /* update flag in swap file */
Karsten Hopp f0abbd
  	    ml_setflags(curbuf);
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 7127,7148 ****
Karsten Hopp f0abbd
  	    curbuf->b_did_warn = FALSE;
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 	need_maketitle = TRUE;
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
      }
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
      /* when 'modifiable' is changed, redraw the window title */
Karsten Hopp f0abbd
      else if ((int *)varp == &curbuf->b_p_ma)
Karsten Hopp f0abbd
! 	need_maketitle = TRUE;
Karsten Hopp f0abbd
      /* when 'endofline' is changed, redraw the window title */
Karsten Hopp f0abbd
      else if ((int *)varp == &curbuf->b_p_eol)
Karsten Hopp f0abbd
! 	need_maketitle = TRUE;
Karsten Hopp f0abbd
! #ifdef FEAT_MBYTE
Karsten Hopp f0abbd
!     /* when 'bomb' is changed, redraw the window title */
Karsten Hopp f0abbd
      else if ((int *)varp == &curbuf->b_p_bomb)
Karsten Hopp f0abbd
! 	need_maketitle = TRUE;
Karsten Hopp f0abbd
! #endif
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
      /* when 'bin' is set also set some other options */
Karsten Hopp f0abbd
--- 7142,7169 ----
Karsten Hopp f0abbd
  	    curbuf->b_did_warn = FALSE;
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 	redraw_titles();
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
      }
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
      /* when 'modifiable' is changed, redraw the window title */
Karsten Hopp f0abbd
      else if ((int *)varp == &curbuf->b_p_ma)
Karsten Hopp f0abbd
!     {
Karsten Hopp f0abbd
! 	redraw_titles();
Karsten Hopp f0abbd
!     }
Karsten Hopp f0abbd
      /* when 'endofline' is changed, redraw the window title */
Karsten Hopp f0abbd
      else if ((int *)varp == &curbuf->b_p_eol)
Karsten Hopp f0abbd
!     {
Karsten Hopp f0abbd
! 	redraw_titles();
Karsten Hopp f0abbd
!     }
Karsten Hopp f0abbd
! # ifdef FEAT_MBYTE
Karsten Hopp f0abbd
!     /* when 'bomb' is changed, redraw the window title and tab page text */
Karsten Hopp f0abbd
      else if ((int *)varp == &curbuf->b_p_bomb)
Karsten Hopp f0abbd
!     {
Karsten Hopp f0abbd
! 	redraw_titles();
Karsten Hopp f0abbd
!     }
Karsten Hopp f0abbd
! # endif
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
      /* when 'bin' is set also set some other options */
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 7150,7156 ****
Karsten Hopp f0abbd
      {
Karsten Hopp f0abbd
  	set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 	need_maketitle = TRUE;
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
      }
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
--- 7171,7177 ----
Karsten Hopp f0abbd
      {
Karsten Hopp f0abbd
  	set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 	redraw_titles();
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
      }
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 7301,7307 ****
Karsten Hopp f0abbd
  	if (!value)
Karsten Hopp f0abbd
  	    save_file_ff(curbuf);	/* Buffer is unchanged */
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 	need_maketitle = TRUE;
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
  #ifdef FEAT_AUTOCMD
Karsten Hopp f0abbd
  	modified_was_set = value;
Karsten Hopp f0abbd
--- 7322,7328 ----
Karsten Hopp f0abbd
  	if (!value)
Karsten Hopp f0abbd
  	    save_file_ff(curbuf);	/* Buffer is unchanged */
Karsten Hopp f0abbd
  #ifdef FEAT_TITLE
Karsten Hopp f0abbd
! 	redraw_titles();
Karsten Hopp f0abbd
  #endif
Karsten Hopp f0abbd
  #ifdef FEAT_AUTOCMD
Karsten Hopp f0abbd
  	modified_was_set = value;
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 7736,7742 ****
Karsten Hopp f0abbd
  	newFoldLevel();
Karsten Hopp f0abbd
      }
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
!     /* 'foldminlevel' */
Karsten Hopp f0abbd
      else if (pp == &curwin->w_p_fml)
Karsten Hopp f0abbd
      {
Karsten Hopp f0abbd
  	foldUpdateAll(curwin);
Karsten Hopp f0abbd
--- 7757,7763 ----
Karsten Hopp f0abbd
  	newFoldLevel();
Karsten Hopp f0abbd
      }
Karsten Hopp f0abbd
  
Karsten Hopp f0abbd
!     /* 'foldminlines' */
Karsten Hopp f0abbd
      else if (pp == &curwin->w_p_fml)
Karsten Hopp f0abbd
      {
Karsten Hopp f0abbd
  	foldUpdateAll(curwin);
Karsten Hopp f0abbd
*** ../vim-7.2.102/src/version.c	Thu Feb  5 20:47:14 2009
Karsten Hopp f0abbd
--- src/version.c	Wed Feb 11 11:32:20 2009
Karsten Hopp f0abbd
***************
Karsten Hopp f0abbd
*** 678,679 ****
Karsten Hopp f0abbd
--- 678,681 ----
Karsten Hopp f0abbd
  {   /* Add new patch number below this line */
Karsten Hopp f0abbd
+ /**/
Karsten Hopp f0abbd
+     103,
Karsten Hopp f0abbd
  /**/
Karsten Hopp f0abbd
Karsten Hopp f0abbd
-- 
Karsten Hopp f0abbd
hundred-and-one symptoms of being an internet addict:
Karsten Hopp f0abbd
73. You give your dog used motherboards instead of bones
Karsten Hopp f0abbd
Karsten Hopp f0abbd
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f0abbd
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f0abbd
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp f0abbd
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///