diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/terminal.c | 6 | ||||
-rw-r--r-- | src/testdir/test_terminal3.vim | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c index 25a6a5dd76..28e1abfec3 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -538,9 +538,15 @@ term_start( split_ea.addr_count = 1; } + int cmod_split_modified = FALSE; if (vertical) + { cmdmod.cmod_split |= WSP_VERT; + cmod_split_modified = TRUE; + } ex_splitview(&split_ea); + if (vertical && cmod_split_modified) + cmdmod.cmod_split &= ~WSP_VERT; if (curwin == old_curwin) { // split failed diff --git a/src/testdir/test_terminal3.vim b/src/testdir/test_terminal3.vim index 848e3fa473..3cca1b05cb 100644 --- a/src/testdir/test_terminal3.vim +++ b/src/testdir/test_terminal3.vim @@ -10,6 +10,8 @@ source screendump.vim source mouse.vim source term_util.vim +import './vim9.vim' as v9 + let $PROMPT_COMMAND='' func Test_terminal_altscreen() @@ -959,4 +961,18 @@ func Test_terminal_vt420() call StopVimInTerminal(buf) endfunc +" Test for using 'vertical' with term_start(). If a following term_start(), +" doesn't have the 'vertical' attribute, then it should be split horizontally. +func Test_terminal_vertical() + let lines =<< trim END + call term_start("NONE", {'vertical': 1}) + call term_start("NONE") + VAR layout = winlayout() + call assert_equal('row', layout[0], string(layout)) + call assert_equal('col', layout[1][0][0], string(layout)) + :%bw! + END + call v9.CheckLegacyAndVim9Success(lines) +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 334ebd716c..78668eaad4 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 473, +/**/ 472, /**/ 471, |