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/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim
index 3d798e9..1f15453 100644
--- a/src/testdir/gen_opt_test.vim
+++ b/src/testdir/gen_opt_test.vim
@@ -94,6 +94,7 @@
\ 'scrolljump': [[-100, -1, 0, 1, 2, 15], [-101, 999]],
\ 'scrolloff': [[0, 1, 8, 999], [-1]],
\ 'shiftwidth': [[0, 1, 8, 999], [-1]],
+ \ 'showtabpanel': [[0, 1, 2], []],
\ 'sidescroll': [[0, 1, 8, 999], [-1]],
\ 'sidescrolloff': [[0, 1, 8, 999], [-1]],
\ 'tabstop': [[1, 4, 8, 12, 9999], [-1, 0, 10000]],
@@ -301,6 +302,11 @@
\ ['xxx']],
\ 'tabclose': [['', 'left', 'uselast', 'left,uselast'], ['xxx']],
\ 'tabline': [['', 'xxx'], ['%$', '%{', '%{%', '%{%}', '%(', '%)']],
+ \ 'tabpanel': [['', 'aaa', 'bbb'], []],
+ \ 'tabpanelopt': [['', 'align:left', 'align:right', 'vert', 'columns:0',
+ \ 'columns:20', 'columns:999'],
+ \ ['xxx', 'align:', 'align:middle', 'colomns:', 'cols:10',
+ \ 'cols:-1']],
\ 'tagcase': [['followic', 'followscs', 'ignore', 'match', 'smart'],
\ ['', 'xxx', 'smart,match']],
\ 'termencoding': [has('gui_gtk') ? [] : ['', 'utf-8'], ['xxx']],
@@ -373,8 +379,17 @@
\ 'verbosefile': [[], ['call delete("Xfile")']],
\}
-const invalid_options = test_values->keys()
+let invalid_options = test_values->keys()
\->filter({-> v:val !~# '^other' && !exists($"&{v:val}")})
+for s:skip_option in [
+ \ [!has('tabpanel'), 'tabpanel'],
+ \ [!has('tabpanel'), 'tabpanelopt'],
+ \ [!has('tabpanel'), 'showtabpanel'],
+ \ ]
+ if s:skip_option[0]
+ call remove(invalid_options, s:skip_option[1])
+ endif
+endfor
if !empty(invalid_options)
throw $"Invalid option name in test_values: '{invalid_options->join("', '")}'"
endif
@@ -406,6 +421,8 @@
let [pre_processing, post_processing] = get(test_prepost, fullname, [[], []])
let script += pre_processing
+ " Setting an option can only fail when it's implemented.
+ call add(script, $"if exists('+{fullname}')")
if line =~ 'P_BOOL'
for opt in [fullname, shortname]
for cmd in ['set', 'setlocal', 'setglobal']
@@ -439,8 +456,6 @@
endfor
" Failure tests
- " Setting an option can only fail when it's implemented.
- call add(script, $"if exists('+{fullname}')")
for opt in [fullname, shortname]
for cmd in ['set', 'setlocal', 'setglobal']
for val in invalid_values
@@ -464,7 +479,6 @@
endfor
endfor
endfor
- call add(script, "endif")
endif
" Cannot change 'termencoding' in GTK
@@ -476,6 +490,8 @@
call add(script, 'endif')
endif
+ call add(script, "endif")
+
let script += post_processing
call add(script, 'endfunc')
endwhile