File tree Expand file tree Collapse file tree 5 files changed +8
-4
lines changed Expand file tree Collapse file tree 5 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,10 @@ function! dispatch#vim_executable() abort
172172 return s: vim
173173endfunction
174174
175+ function ! dispatch#has_callback () abort
176+ return has (' clientserver' ) && ! empty (v: servername )
177+ endfunction
178+
175179function ! dispatch#callback (request) abort
176180 if has (' clientserver' ) && ! empty (v: servername ) && has_key (s: request (a: request ), ' id' )
177181 return dispatch#shellescape (dispatch#vim_executable ()) .
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ function! dispatch#iterm#handle(request) abort
1010 return 0
1111 endif
1212 if a: request .action == # ' make'
13- if ! get (a: request , ' background' , 0 ) && ! has ( ' gui_running ' )
13+ if ! get (a: request , ' background' , 0 ) && ! dispatch#has_callback ( )
1414 return 0
1515 endif
1616 let exec = dispatch#prepare_make (a: request )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ function! dispatch#screen#handle(request) abort
1010 return 0
1111 endif
1212 if a: request .action == # ' make'
13- if ! get (a: request , ' background' , 0 ) && empty ( v: servername )
13+ if ! get (a: request , ' background' , 0 ) && ! dispatch#has_callback ( )
1414 return 0
1515 endif
1616 return dispatch#screen#spawn (dispatch#prepare_make (a: request ), a: request )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function! dispatch#tmux#handle(request) abort
1818 endif
1919
2020 if a: request .action == # ' make'
21- if ! get (a: request , ' background' , 0 ) && empty ( v: servername ) &&
21+ if ! get (a: request , ' background' , 0 ) && ! dispatch#has_callback ( ) &&
2222 \ ! empty (' ' .session) && session !=# system (' tmux display-message -p "#S"' )[0 :-2 ]
2323 return 0
2424 endif
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function! dispatch#x11#handle(request) abort
2323 return 0
2424 endif
2525 if a: request .action == # ' make'
26- if ! get (a: request , ' background' , 0 ) && empty ( v: servername )
26+ if ! get (a: request , ' background' , 0 ) && ! dispatch#has_callback ( )
2727 return 0
2828 endif
2929 return dispatch#x11#spawn (terminal , dispatch#prepare_make (a: request ), a: request )
You can’t perform that action at this time.
0 commit comments