Blame SOURCES/7.4.480

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.480
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.480 (after 7.4.479)
22c937
Problem:    MS-Windows: Can't build.
22c937
Solution:   Remove goto, use a flag instead.
22c937
Files:	    src/os_win32.c
22c937
22c937
22c937
*** ../vim-7.4.479/src/os_win32.c	2014-10-15 22:50:06.946093724 +0200
22c937
--- src/os_win32.c	2014-10-16 16:09:57.182230006 +0200
22c937
***************
22c937
*** 4646,4654 ****
22c937
      int		x = 0;
22c937
      int		tmode = cur_tmode;
22c937
  #ifdef FEAT_TITLE
22c937
!     char szShellTitle[512];
22c937
! 
22c937
  # ifdef FEAT_MBYTE
22c937
      /* Change the title to reflect that we are in a subshell. */
22c937
      if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
22c937
      {
22c937
--- 4646,4655 ----
22c937
      int		x = 0;
22c937
      int		tmode = cur_tmode;
22c937
  #ifdef FEAT_TITLE
22c937
!     char	szShellTitle[512];
22c937
  # ifdef FEAT_MBYTE
22c937
+     int		did_set_title = FALSE;
22c937
+ 
22c937
      /* Change the title to reflect that we are in a subshell. */
22c937
      if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
22c937
      {
22c937
***************
22c937
*** 4671,4695 ****
22c937
  			wcscat(szShellTitle, wn);
22c937
  		    SetConsoleTitleW(szShellTitle);
22c937
  		    vim_free(wn);
22c937
! 		    goto didset;
22c937
  		}
22c937
  	    }
22c937
  	}
22c937
      }
22c937
! #endif
22c937
!     /* Change the title to reflect that we are in a subshell. */
22c937
!     if (GetConsoleTitle(szShellTitle, sizeof(szShellTitle) - 4) > 0)
22c937
!     {
22c937
! 	if (cmd == NULL)
22c937
! 	    strcat(szShellTitle, " :sh");
22c937
! 	else
22c937
  	{
22c937
! 	    strcat(szShellTitle, " - !");
22c937
! 	    if ((strlen(szShellTitle) + strlen(cmd) < sizeof(szShellTitle)))
22c937
! 		strcat(szShellTitle, cmd);
22c937
  	}
22c937
- 	SetConsoleTitle(szShellTitle);
22c937
-     }
22c937
  #endif
22c937
  
22c937
      out_flush();
22c937
--- 4672,4697 ----
22c937
  			wcscat(szShellTitle, wn);
22c937
  		    SetConsoleTitleW(szShellTitle);
22c937
  		    vim_free(wn);
22c937
! 		    did_set_title = TRUE;
22c937
  		}
22c937
  	    }
22c937
  	}
22c937
      }
22c937
!     if (!did_set_title)
22c937
! # endif
22c937
! 	/* Change the title to reflect that we are in a subshell. */
22c937
! 	if (GetConsoleTitle(szShellTitle, sizeof(szShellTitle) - 4) > 0)
22c937
  	{
22c937
! 	    if (cmd == NULL)
22c937
! 		strcat(szShellTitle, " :sh");
22c937
! 	    else
22c937
! 	    {
22c937
! 		strcat(szShellTitle, " - !");
22c937
! 		if ((strlen(szShellTitle) + strlen(cmd) < sizeof(szShellTitle)))
22c937
! 		    strcat(szShellTitle, cmd);
22c937
! 	    }
22c937
! 	    SetConsoleTitle(szShellTitle);
22c937
  	}
22c937
  #endif
22c937
  
22c937
      out_flush();
22c937
*** ../vim-7.4.479/src/version.c	2014-10-15 22:50:06.950093724 +0200
22c937
--- src/version.c	2014-10-16 16:11:34.278230218 +0200
22c937
***************
22c937
*** 743,744 ****
22c937
--- 743,746 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     480,
22c937
  /**/
22c937
22c937
-- 
22c937
Ten bugs in the hand is better than one as yet undetected.
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///