Skip to content

Commit 0a00522

Browse files
lambdalisueda-x
authored andcommitted
Use separate buffer in Neovim
While the behavior of 'terminal' in Vim and Neovim is different, all Neovim users cannot get backto the original buffer if terminal command has directly applied. To make the behavior consistent, execute 'new' prior to 'terminal' in Neovim.
1 parent 8293adc commit 0a00522

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

autoload/rust.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,10 @@ function! rust#Test(all, options) abort
514514
return rust#Run(1, '--test ' . a:options)
515515
endif
516516

517-
if has('terminal') || has('nvim')
517+
if has('terminal')
518518
let cmd = 'terminal '
519+
elseif has('nvim')
520+
let cmd = 'new | terminal '
519521
else
520522
let cmd = '!'
521523
let manifest = shellescape(manifest)

0 commit comments

Comments
 (0)