When changing focus away and back to vim while in the middle of editing the command-line, vim-tmux-focus-events emits errors from the function called by the `:cnoremap` mappings. This patch replaces these mappings with a call to `do#sink()` which does nothing. Simply removing the mappings will result in `<F24><F25>` being inserted on the command-line since tmux will send this text when `tmux set-option -g focus-events on`, this is why `do#sink()` is needed.
9 lines
406 B
VimL
9 lines
406 B
VimL
if get(g:, 'loaded_tmux_focus_events', 0)
|
|
" Override vim-tmux-focue-events command-line mappings when tmux send <F24>
|
|
" FocusLost and <F25> FocusLost instead of to call do#sink() which does
|
|
" nothing. This is required due to errors emitted from the
|
|
" vim-tmux-focus-events plugin when chaning focus.
|
|
cnoremap <silent> <F24> <C-\>edo#sink()<CR>
|
|
cnoremap <silent> <F25> <C-\>edo#sink()<CR>
|
|
endif
|