]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.0.1726: older MSVC doesn't support declarations halfway a block v8.0.1726
authorBram Moolenaar <Bram@vim.org>
Mon, 16 Apr 2018 15:06:09 +0000 (17:06 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 16 Apr 2018 15:06:09 +0000 (17:06 +0200)
Problem:    Older MSVC doesn't support declarations halfway a block.
Solution:   Move the declaration back to the start of the block.

src/main.c
src/version.c

index a773122a89d8743db626ed7b7e6438b97f5ec000..3b366b507d56b8ddf212af7d0e7348ef3b88c2de 100644 (file)
@@ -1056,6 +1056,7 @@ main_loop(
     int                cmdwin,     /* TRUE when working in the command-line window */
     int                noexmode)   /* TRUE when return on entering Ex mode */
 {
+    oparg_T    oa;     /* operator arguments */
     volatile int previous_got_int = FALSE;     /* "got_int" was TRUE */
 #ifdef FEAT_CONCEAL
     /* these are static to avoid a compiler warning */
@@ -1095,7 +1096,6 @@ main_loop(
     }
 #endif
 
-    oparg_T    oa;     /* operator arguments */
     clear_oparg(&oa);
     while (!cmdwin
 #ifdef FEAT_CMDWIN
@@ -1383,11 +1383,6 @@ getout_preserve_modified(int exitval)
     void
 getout(int exitval)
 {
-    tabpage_T  *tp;
-    tabpage_T  *next_tp;
-    buf_T      *buf;
-    win_T      *wp;
-
     exiting = TRUE;
 #if defined(FEAT_JOB_CHANNEL)
     ch_log(NULL, "Exiting...");
@@ -1416,6 +1411,11 @@ getout(int exitval)
 
     if (v_dying <= 1)
     {
+       tabpage_T       *tp;
+       tabpage_T       *next_tp;
+       buf_T           *buf;
+       win_T           *wp;
+
        /* Trigger BufWinLeave for all windows, but only once per buffer. */
        for (tp = first_tabpage; tp != NULL; tp = next_tp)
        {
index f3143fe97b5c3313ad675ad993f418a28c40ceab..ba093c56f1daaa440a7c35c036deae2c90b93018 100644 (file)
@@ -762,6 +762,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1726,
 /**/
     1725,
 /**/