File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ if (exists('g:loaded_arduino_autoload') && g:loaded_arduino_autoload)
3
3
endif
4
4
let g: loaded_arduino_autoload = 1
5
5
let s: HERE = resolve (expand (' <sfile>:p:h:h' ))
6
+ " In neovim, run the shell commands using :terminal to preserve interactivity
7
+ if has (' nvim' )
8
+ let s: TERM = ' terminal! '
9
+ else
10
+ let s: TERM = ' !'
11
+ endif
6
12
7
13
" Initialization {{{1
8
14
" Set up all user configuration variables
@@ -262,15 +268,15 @@ endfunction
262
268
function ! arduino#Verify ()
263
269
let cmd = arduino#GetArduinoCommand (" --verify" )
264
270
exe " :silent !echo " . cmd
265
- exe " :! " . cmd
271
+ exe " :" . s: TERM . cmd
266
272
redraw !
267
273
return v: shell_error
268
274
endfunction
269
275
270
276
function ! arduino#Upload ()
271
277
let cmd = arduino#GetArduinoCommand (" --upload" )
272
278
exe " :silent !echo " . cmd
273
- exe " :silent ! " . cmd
279
+ exe " :silent " . s: TERM . cmd
274
280
redraw !
275
281
return v: shell_error
276
282
endfunction
@@ -280,9 +286,9 @@ function! arduino#Serial()
280
286
if empty (cmd) | return | endif
281
287
exe " :silent !echo " . cmd
282
288
if ! empty ($TMUX ) && ! empty (g: arduino_serial_tmux )
283
- exe " :! tmux " . g: arduino_serial_tmux . " '" . cmd . " '"
289
+ exe " :" . s: TERM . " tmux " . g: arduino_serial_tmux . " '" . cmd . " '"
284
290
else
285
- exe " :! " . cmd
291
+ exe " :" . s: TERM . cmd
286
292
endif
287
293
redraw !
288
294
endfunction
You can’t perform that action at this time.
0 commit comments