]> granicus.if.org Git - vim/commitdiff
patch 8.0.0425: build errors when building without folding v8.0.0425
authorBram Moolenaar <Bram@vim.org>
Sun, 5 Mar 2017 20:18:27 +0000 (21:18 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 5 Mar 2017 20:18:27 +0000 (21:18 +0100)
Problem:    Build errors when building without folding.
Solution:   Add #ifdefs. (John Marriott)

src/diff.c
src/edit.c
src/option.c
src/syntax.c
src/version.c

index 8d7421dd73faa574edb3f8a2ef441a6af25f4f63..b64b45ce9607feabe48a9cbd5da3d6cd17fe2ee0 100644 (file)
@@ -2616,7 +2616,6 @@ diff_get_corresponding_line(buf_T *buf1, linenr_T lnum1)
     return lnum;
 }
 
-#if defined(FEAT_FOLDING) || defined(PROTO)
 /*
  * For line "lnum" in the current window find the equivalent lnum in window
  * "wp", compensating for inserted/deleted lines.
@@ -2656,6 +2655,5 @@ diff_lnum_win(linenr_T lnum, win_T *wp)
        n = dp->df_lnum[i] + dp->df_count[i];
     return n;
 }
-#endif
 
 #endif /* FEAT_DIFF */
index 25896f3d3c746716e416de15e44ed33aff0a9db1..6621515b575e788d4c5dac4ed697bfb6e9e33740 100644 (file)
@@ -541,8 +541,8 @@ edit(
 
     /*
      * Handle restarting Insert mode.
-     * Don't do this for "CTRL-O ." (repeat an insert): we get here with
-     * restart_edit non-zero, and something in the stuff buffer.
+     * Don't do this for "CTRL-O ." (repeat an insert): In that case we get
+     * here with something in the stuff buffer.
      */
     if (restart_edit != 0 && stuff_empty())
     {
@@ -1453,10 +1453,14 @@ doESCkey:
 
 docomplete:
            compl_busy = TRUE;
+#ifdef FEAT_FOLDING
            disable_fold_update++;  /* don't redraw folds here */
+#endif
            if (ins_complete(c, TRUE) == FAIL)
                compl_cont_status = 0;
+#ifdef FEAT_FOLDING
            disable_fold_update--;
+#endif
            compl_busy = FALSE;
            break;
 #endif /* FEAT_INS_EXPAND */
index d4e760b89330458618d46c1c9bcbf5ea6c0417f1..b0baf501854de9a15f6467872790af5da21d6937 100644 (file)
@@ -4535,8 +4535,11 @@ do_set(
                 * "wrap" gets set. */
                if (curwin->w_p_diff
                        && opt_idx >= 0  /* shut up coverity warning */
-                       && (options[opt_idx].indir == PV_FDM
-                           || options[opt_idx].indir == PV_WRAP))
+                       && (
+#ifdef FEAT_FOLDING
+                           options[opt_idx].indir == PV_FDM ||
+#endif
+                           options[opt_idx].indir == PV_WRAP))
                    goto skip;
 #endif
            }
index 0d9cd2cedc7648a3abb98ad0750d9cfb970ac164..11f679c0c831bbd66d73a76dd6b76abdf5805913 100644 (file)
@@ -1183,11 +1183,12 @@ syn_stack_free_block(synblock_T *block)
     void
 syn_stack_free_all(synblock_T *block)
 {
+#ifdef FEAT_FOLDING
     win_T      *wp;
+#endif
 
     syn_stack_free_block(block);
 
-
 #ifdef FEAT_FOLDING
     /* When using "syntax" fold method, must update all folds. */
     FOR_ALL_WINDOWS(wp)
index b9d3d1e8920372b0f1ad371488fef5c7a2810439..b5af6be700498c30a73d1124f91af4d91f13513b 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    425,
 /**/
     424,
 /**/