patch 9.1.1391: Vim does not have a vertical tabpanel
Problem: Vim does not have a tabpanel
Solution: include the tabpanel feature
(Naruhiko Nishino, thinca)
closes: #17263
Co-authored-by: thinca <thinca@gmail.com>
Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/optionstr.c b/src/optionstr.c
index ce57cb4..8e233e8 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -28,6 +28,9 @@
// Note: Keep this in sync with briopt_check()
static char *(p_briopt_values[]) = {"shift:", "min:", "sbr", "list:", "column:", NULL};
#endif
+#if defined(FEAT_TABPANEL)
+static char *(p_tpl_values[]) = {"wrap", "align:", "columns:", "vert:", NULL};
+#endif
#if defined(FEAT_DIFF)
// Note: Keep this in sync with diffopt_changed()
static char *(p_dip_values[]) = {"filler", "context:", "iblank", "icase", "iwhite", "iwhiteall", "iwhiteeol", "horizontal", "vertical", "closeoff", "hiddenoff", "foldcolumn:", "followwrap", "internal", "indent-heuristic", "algorithm:", "inline:", "linematch:", NULL};
@@ -3547,6 +3550,33 @@
}
#endif
+#if defined(FEAT_TABPANEL)
+/*
+ * Process the new 'tabpanelopt' option value.
+ */
+ char *
+did_set_tabpanelopt(optset_T *args)
+{
+ if (tabpanelopt_changed() == FAIL)
+ return e_invalid_argument;
+
+ shell_new_columns();
+
+ return NULL;
+}
+
+ int
+expand_set_tabpanelopt(optexpand_T *args, int *numMatches, char_u ***matches)
+{
+ return expand_set_opt_string(
+ args,
+ p_tpl_values,
+ ARRAY_LENGTH(p_tpl_values) - 1,
+ numMatches,
+ matches);
+}
+#endif
+
/*
* The 'scrollopt' option is changed.
*/