Skip to content

Commit fb3fa6e

Browse files
mhinzda-x
authored andcommitted
RustTest: open terminal buffer in split window
This only happens for Vim 8.0.910+ and is necessary step to making :RustTest take window sizes.
1 parent dfb55c9 commit fb3fa6e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/rust.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,11 @@ function! rust#Test(mods, all, options) abort
514514
endif
515515

516516
if has('terminal')
517-
let cmd = printf('%s terminal ', a:mods)
517+
if has('patch-8.0.910')
518+
let cmd = printf('%s noautocmd new | terminal ++curwin ', a:mods)
519+
else
520+
let cmd = printf('%s terminal ', a:mods)
521+
endif
518522
elseif has('nvim')
519523
let cmd = printf('%s noautocmd new | terminal ', a:mods)
520524
else

0 commit comments

Comments
 (0)