Skip to content

Commit

Permalink
Disable swap files in the neovim buffers too
Browse files Browse the repository at this point in the history
  • Loading branch information
puremourning committed Jan 15, 2020
1 parent c2b0cc8 commit 099ffc2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions autoload/vimspector/internal/neojob.vim
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ function! vimspector#internal#neojob#StartDebugSession( config ) abort
\ 'on_stderr': funcref( 's:_OnEvent' ),
\ 'on_exit': funcref( 's:_OnEvent' ),
\ 'cwd': a:config[ 'cwd' ],
\ 'env': a:config[ 'env' ],
\ }
\ )

" FIXME: Missing in neovim 0.4. But in master:
" \ 'env': a:config[ 'env' ],
"

" FIXME: error handling ?
Expand Down Expand Up @@ -82,14 +82,12 @@ endfunction

function! vimspector#internal#neojob#StopDebugSession() abort
if !exists( 's:job' )
echom "Not stopping session: Job doesn't exist"
redraw
return
endif

if s:JobIsRunning( s:job )
echom 'Terminating job'
redraw
echom 'Terminating job'
redraw
call jobstop( s:job )
endif
endfunction
Expand Down Expand Up @@ -145,6 +143,7 @@ function! s:SetUpHiddenBuffer( buffer ) abort
call setbufvar( a:buffer, '&hidden', 1 )
call setbufvar( a:buffer, '&bufhidden', 'hide' )
call setbufvar( a:buffer, '&wrap', 0 )
call setbufvar( a:buffer, '&swapfile', 0 )
call s:MakeBufferReadOnly( a:buffer )
endfunction

Expand Down

0 comments on commit 099ffc2

Please sign in to comment.