Bram,
Disabling folding (FEAT_FOLDING) generates a number of compile errors, a
warning and a linking error (on HPUX and Windows), like so (this is on
Windows using mingw64):
...
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
-DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer
-freg-struct-return -s edit.c -o gobjnative/edit.o
edit.c: In function 'edit':
edit.c:1456:6: error: 'disable_fold_update' undeclared (first use in
this function)
disable_fold_update++; /* don't redraw folds here */
^~~~~~~~~~~~~~~~~~~
edit.c:1456:6: note: each undeclared identifier is reported only once
for each function it appears in
...
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
-DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer
-freg-struct-return -s option.c -o gobjnative/option.o
option.c: In function 'do_set':
option.c:4526:34: error: 'PV_FDM' undeclared (first use in this function)
&& (options[opt_idx].indir == PV_FDM
^~~~~~
option.c:4526:34: note: each undeclared identifier is reported only once
for each function it appears in
...
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -pipe -march=native -Wall
-O3 -fomit-frame-pointer -freg-struct-return -s syntax.c -o
objnative/syntax.o
syntax.c: In function 'syn_stack_free_all':
syntax.c:1186:12: warning: unused variable 'wp' [-Wunused-variable]
win_T *wp;
^~
...
gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF
-DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32 -D
FEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer
-freg-struct-return -s -Wl,-nxcompat,-dynamicbase -mwi
ndows -o gvim.exe gobjnative/arabic.o gobjnative/blowfish.o
gobjnative/buffer.o gobjnative/charset.o gobjnative/crypt.o
gobjnative/crypt_zip.o gobjnative/dict.o gobjnative/diff.o
gobjnative/digraph.o gobjnative/edit.o gobjnative/eval.o gobj
native/evalfunc.o gobjnative/ex_cmds.o gobjnative/ex_cmds2.o
gobjnative/ex_docmd.o gobjnative/ex_eval.o gobjnative/ex_ge
tln.o gobjnative/farsi.o gobjnative/fileio.o gobjnative/fold.o
gobjnative/getchar.o gobjnative/hardcopy.o gobjnative/has
htab.o gobjnative/json.o gobjnative/list.o gobjnative/main.o
gobjnative/mark.o gobjnative/memfile.o gobjnative/memline.o
gobjnative/menu.o gobjnative/message.o gobjnative/misc1.o
gobjnative/misc2.o gobjnative/move.o gobjnative/mbyte.o gobjn
ative/normal.o gobjnative/ops.o gobjnative/option.o
gobjnative/os_win32.o gobjnative/os_mswin.o gobjnative/winclip.o gob
jnative/pathdef.o gobjnative/popupmnu.o gobjnative/quickfix.o
gobjnative/regexp.o gobjnative/screen.o gobjnative/search.
o gobjnative/sha256.o gobjnative/spell.o gobjnative/spellfile.o
gobjnative/syntax.o gobjnative/tag.o gobjnative/term.o g
objnative/ui.o gobjnative/undo.o gobjnative/userfunc.o
gobjnative/version.o gobjnative/vimrc.o gobjnative/window.o gobjn
ative/gui.o gobjnative/gui_w32.o gobjnative/gui_beval.o
gobjnative/os_w32exe.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -l
comdlg32 -lcomctl32 -lversion -lole32 -luuid
gobjnative/misc1.o:misc1.c:(.text+0x3848): undefined reference to
`diff_lnum_win'
gobjnative/misc1.o:misc1.c:(.text+0x49b5): undefined reference to
`diff_lnum_win'
gobjnative/misc1.o:misc1.c:(.text+0x6729): undefined reference to
`diff_lnum_win'
gobjnative/misc1.o:misc1.c:(.text+0x6894): undefined reference to
`diff_lnum_win'
gobjnative/misc1.o:misc1.c:(.text+0x6a05): undefined reference to
`diff_lnum_win'
gobjnative/misc1.o:misc1.c:(.text+0x6b74): more undefined references to
`diff_lnum_win' follow
collect2.exe: error: ld returned 1 exit status
Make_cyg_ming.mak:843: recipe for target 'gvim.exe' failed
make: *** [gvim.exe] Error 1
The attached patches seem to fix it. Please check.
Cheers
John
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
--- diff.c.orig 2017-02-04 09:37:18.931736800 +1100
+++ diff.c 2017-03-05 07:14:01.792884100 +1100
@@ -2616,7 +2616,6 @@
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 @@
n = dp->df_lnum[i] + dp->df_count[i];
return n;
}
-#endif
#endif /* FEAT_DIFF */
--- syntax.c.orig 2017-02-26 05:40:14.764153900 +1100
+++ syntax.c 2017-03-05 07:12:06.881488100 +1100
@@ -1183,7 +1183,9 @@
void
syn_stack_free_all(synblock_T *block)
{
+#ifdef FEAT_FOLDING
win_T *wp;
+#endif
syn_stack_free_block(block);
--- option.c.orig 2017-02-26 09:13:08.358246700 +1100
+++ option.c 2017-03-05 07:10:27.210600300 +1100
@@ -4523,8 +4523,11 @@
* "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
}
--- edit.c.orig 2017-03-02 05:13:36.117819100 +1100
+++ edit.c 2017-03-05 07:08:26.352542200 +1100
@@ -1453,10 +1453,14 @@
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 */