mirror of
https://github.com/amix/vimrc
synced 2025-06-23 06:35:01 +08:00
Updated plugins
This commit is contained in:
@ -60,8 +60,10 @@ function! s:on_stdout_nvim(_job_id, data, _event) dict abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:on_stderr_nvim(_job_id, _data, _event) dict abort
|
||||
call self.handler.err(self.buffer)
|
||||
function! s:on_stderr_nvim(_job_id, data, _event) dict abort
|
||||
if a:data != [''] " With Neovim there is always [''] reported on stderr.
|
||||
call self.handler.err(self.buffer)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:on_exit_nvim(_job_id, exit_code, _event) dict abort
|
||||
|
@ -171,17 +171,17 @@ endfunction
|
||||
|
||||
function! gitgutter#hunk#stage() abort
|
||||
call s:hunk_op(function('s:stage'))
|
||||
silent! call repeat#set("\<Plug>GitGutterStageHunk", -1)<CR>
|
||||
silent! call repeat#set("\<Plug>GitGutterStageHunk", -1)
|
||||
endfunction
|
||||
|
||||
function! gitgutter#hunk#undo() abort
|
||||
call s:hunk_op(function('s:undo'))
|
||||
silent! call repeat#set("\<Plug>GitGutterUndoHunk", -1)<CR>
|
||||
silent! call repeat#set("\<Plug>GitGutterUndoHunk", -1)
|
||||
endfunction
|
||||
|
||||
function! gitgutter#hunk#preview() abort
|
||||
call s:hunk_op(function('s:preview'))
|
||||
silent! call repeat#set("\<Plug>GitGutterPreviewHunk", -1)<CR>
|
||||
silent! call repeat#set("\<Plug>GitGutterPreviewHunk", -1)
|
||||
endfunction
|
||||
|
||||
|
||||
|
@ -212,9 +212,16 @@ augroup gitgutter
|
||||
" vim -o file1 file2
|
||||
autocmd VimEnter * if winnr() != winnr('$') | call gitgutter#all(0) | endif
|
||||
|
||||
autocmd FocusGained,ShellCmdPost * call gitgutter#all(1)
|
||||
autocmd ShellCmdPost * call gitgutter#all(1)
|
||||
autocmd BufLeave term://* call gitgutter#all(1)
|
||||
|
||||
" Handle all buffers when focus is gained, but only after it was lost.
|
||||
" FocusGained gets triggered on startup with Neovim at least already.
|
||||
" Therefore this tracks also if it was lost before.
|
||||
let s:focus_was_lost = 0
|
||||
autocmd FocusGained * if s:focus_was_lost | let focus_was_lost = 0 | call gitgutter#all(1) | endif
|
||||
autocmd FocusLost * let s:focus_was_lost = 1
|
||||
|
||||
if exists('##VimResume')
|
||||
autocmd VimResume * call gitgutter#all(1)
|
||||
endif
|
||||
|
Reference in New Issue
Block a user