MacVim GUI 7.4.1832+ supports async diffs.

This commit is contained in:
Andy Stewart
2016-05-16 10:10:11 +01:00
parent cae4f72aa1
commit 053581db5c
2 changed files with 10 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ A Vim plugin which shows a git diff in the 'gutter' (sign column). It shows whe
Features:
* Shows signs for added, modified, and removed lines.
* Runs the diffs asynchronously in terminal Vim (7.4.1826+) and NeoVim.
* Runs the diffs asynchronously in terminal Vim (7.4.1826+), NeoVim and MacVim GUI (7.4.1832+).
* Ensures signs are always as up to date as possible (but without running more than necessary).
* Quick jumping between blocks of changed lines ("hunks").
* Stage/undo/preview individual hunks.

View File

@@ -1,5 +1,13 @@
let s:jobs = {}
let s:available = has('nvim') || (has('patch-7-4-1826') && !has('gui_running'))
" MacVim requires 88f4fe0 but that commit doesn't have a specific patch
" number. So look for the first subsequent Vim patch.
"
" gVim doesn't work properly with channels yet as far as I know.
let s:available = has('nvim') || (
\ (has('gui_macvim') && has('patch-7-4-1832')) ||
\ (has('patch-7-4-1826') && !has('gui_running'))
\ )
function! gitgutter#async#available()
return s:available