comparison src/feature.h @ 12477:68d7bc045dbe v8.0.1118

patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs commit https://github.com/vim/vim/commit/4033c55eca575777718c0701e26635a0cc47d907 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 16 20:54:51 2017 +0200 patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs Problem: FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always enabled and only adds 7% to the binary size of the tiny build. Solution: Graduate FEAT_WINDOWS.
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Sep 2017 21:00:06 +0200
parents 3ed8bcc9a013
children 351cf7c67bbe
comparison
equal deleted inserted replaced
12476:2516383741e6 12477:68d7bc045dbe
92 * Optional code (see ":help +feature-list") 92 * Optional code (see ":help +feature-list")
93 * ============= 93 * =============
94 */ 94 */
95 95
96 /* 96 /*
97 * These features used to be optional but are now always enabled.
97 * +windows Multiple windows. Without this there is no help 98 * +windows Multiple windows. Without this there is no help
98 * window and no status lines. 99 * window and no status lines.
99 * +vertsplit Vertically split windows. 100 * +vertsplit Vertically split windows.
100 */ 101 */
101 #ifdef FEAT_SMALL
102 # define FEAT_WINDOWS
103 #endif
104 102
105 /* 103 /*
106 * +listcmds Vim commands for the buffer list and the argument 104 * +listcmds Vim commands for the buffer list and the argument
107 * list. Without this there is no ":buffer" ":bnext", 105 * list. Without this there is no ":buffer" ":bnext",
108 * ":bdel", ":argdelete", etc. 106 * ":bdel", ":argdelete", etc.
132 */ 130 */
133 #ifdef FEAT_SMALL 131 #ifdef FEAT_SMALL
134 # define FEAT_JUMPLIST 132 # define FEAT_JUMPLIST
135 #endif 133 #endif
136 134
137 /* the cmdline-window requires FEAT_WINDOWS and FEAT_CMDHIST */ 135 /* the cmdline-window requires FEAT_CMDHIST */
138 #if defined(FEAT_WINDOWS) && defined(FEAT_CMDHIST) 136 #if defined(FEAT_CMDHIST)
139 # define FEAT_CMDWIN 137 # define FEAT_CMDWIN
140 #endif 138 #endif
141 139
142 /* 140 /*
143 * +folding Fold lines. 141 * +folding Fold lines.
450 448
451 /* 449 /*
452 * +diff Displaying diffs in a nice way. 450 * +diff Displaying diffs in a nice way.
453 * Requires +windows and +autocmd. 451 * Requires +windows and +autocmd.
454 */ 452 */
455 #if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) && defined(FEAT_AUTOCMD) 453 #if defined(FEAT_NORMAL) && defined(FEAT_AUTOCMD)
456 # define FEAT_DIFF 454 # define FEAT_DIFF
457 #endif 455 #endif
458 456
459 /* 457 /*
460 * +title 'title' and 'icon' options 458 * +title 'title' and 'icon' options
488 #endif 486 #endif
489 487
490 /* 488 /*
491 * +wildmenu 'wildmenu' option 489 * +wildmenu 'wildmenu' option
492 */ 490 */
493 #if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) 491 #if defined(FEAT_NORMAL)
494 # define FEAT_WILDMENU 492 # define FEAT_WILDMENU
495 #endif 493 #endif
496 494
497 /* 495 /*
498 * +viminfo reading/writing the viminfo file. Takes about 8Kbyte 496 * +viminfo reading/writing the viminfo file. Takes about 8Kbyte
593 591
594 /* 592 /*
595 * +mksession ":mksession" command. 593 * +mksession ":mksession" command.
596 * Requires +windows and +vertsplit. 594 * Requires +windows and +vertsplit.
597 */ 595 */
598 #if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) 596 #if defined(FEAT_NORMAL)
599 # define FEAT_SESSION 597 # define FEAT_SESSION
600 #endif 598 #endif
601 599
602 /* 600 /*
603 * +multi_lang Multi language support. ":menutrans", ":language", etc. 601 * +multi_lang Multi language support. ":menutrans", ":language", etc.
704 #endif 702 #endif
705 703
706 /* 704 /*
707 * +scrollbind synchronization of split windows 705 * +scrollbind synchronization of split windows
708 */ 706 */
709 #if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) 707 #if defined(FEAT_NORMAL)
710 # define FEAT_SCROLLBIND 708 # define FEAT_SCROLLBIND
711 #endif 709 #endif
712 710
713 /* 711 /*
714 * +cursorbind synchronization of split windows 712 * +cursorbind synchronization of split windows
715 */ 713 */
716 #if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) 714 #if defined(FEAT_NORMAL)
717 # define FEAT_CURSORBIND 715 # define FEAT_CURSORBIND
718 #endif 716 #endif
719 717
720 /* 718 /*
721 * +menu ":menu" command 719 * +menu ":menu" command
752 #endif 750 #endif
753 751
754 /* 752 /*
755 * GUI tabline 753 * GUI tabline
756 */ 754 */
757 #if defined(FEAT_WINDOWS) && defined(FEAT_NORMAL) \ 755 #if defined(FEAT_NORMAL) \
758 && (defined(FEAT_GUI_GTK) \ 756 && (defined(FEAT_GUI_GTK) \
759 || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \ 757 || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
760 || defined(FEAT_GUI_MAC) \ 758 || defined(FEAT_GUI_MAC) \
761 || (defined(FEAT_GUI_MSWIN) \ 759 || (defined(FEAT_GUI_MSWIN) \
762 && (!defined(_MSC_VER) || _MSC_VER > 1020))) 760 && (!defined(_MSC_VER) || _MSC_VER > 1020)))