@@ -132,27 +132,29 @@ endfunction
132
132
133
133
" Indicate to tmux keybindings that we handle $TMUX_PANE.
134
134
if exists (' *jobstart' )
135
- let s: async_f = ' jobstart'
135
+ function ! s: setup_indicator () abort
136
+ call call (' jobstart' , [s: GetTmuxCommand ([' set' , ' -a' , ' @tmux_navigator' , ' -' .$TMUX_PANE .' -' ])])
137
+ endfunction
136
138
elseif exists (' *job_start' )
137
- let s: async_f = ' job_start'
139
+ function ! s: setup_indicator () abort
140
+ call call (' job_start' , [s: GetTmuxCommand ([' set' , ' -a' , ' @tmux_navigator' , ' -' .$TMUX_PANE .' -' ])])
141
+ endfunction
138
142
else
139
- let s: async_f = ' system'
143
+ function ! s: setup_indicator () abort
144
+ call s: TmuxCommand ([' set' , ' -a' , ' @tmux_navigator' , ' -' .$TMUX_PANE .' -' ])
145
+ endfunction
140
146
endif
141
147
142
148
function ! s: get_indicator () abort
143
149
return s: TmuxCommand ([' show' , ' -v' , ' @tmux_navigator' ])
144
150
endfunction
145
151
command ! TmuxNavigatorPaneIndicator echo s: get_indicator ()
146
152
147
- function ! s: setup_indicator () abort
148
- call call (s: async_f , [s: GetTmuxCommand ([' set' , ' -a' , ' @tmux_navigator' , ' -' .$TMUX_PANE .' -' ])])
149
- endfunction
150
-
151
153
function ! s: remove_indicator () abort
152
154
let cur = s: get_indicator ()
153
155
" Remove indicators globally (especially important with nested Vim in :term).
154
156
let new = substitute (cur, ' -' .$TMUX_PANE .' -' , ' ' , ' g' )
155
- call call ( s: async_f , [ s: GetTmuxCommand ([' set' , ' @tmux_navigator' , new ]) ])
157
+ call s: TmuxCommand ([' set' , ' @tmux_navigator' , new ])
156
158
endfunction
157
159
158
160
augroup tmux_navigator
0 commit comments