When creating a terminal window in neovim, use a new buffer
neovim's termopen() replaces the buffer object in the current window
with a terminal, internally, this completely breaks the buffer list.
Repro:
* Create test.vim:
```
vsplit
call termopen( '/bin/bash', { 'cwd': getcwd() } )
call bufload( expand( '<sfile>' ) )
```
Then:
* `nvim -Nu NONE test.vim`
* `:source %`
Error is "Invald buffer name 'test.vim'"
Anyway, the correct thing to do is to create a _new_ buffer before
making it into a terminal (vnew, new) rather than a split of the current
one. This was only working before because the CodeView window never had
any buffer in it and was broken by the change to use the current buffer
when staring debugging.
Fixes #131
This commit is contained in:
parent
1b7402915c
commit
c1283a292c
1 changed files with 2 additions and 2 deletions
|
|
@ -48,9 +48,9 @@ endfunction
|
|||
function! vimspector#internal#neoterm#Start( cmd, opts ) abort
|
||||
if ! get( a:opts, 'curwin', 0 )
|
||||
if get( a:opts, 'vertical', 0 )
|
||||
vsplit
|
||||
vnew
|
||||
else
|
||||
split
|
||||
new
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue