From 053581db5c8ca788ba7db7135b12393ab5404a24 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 16 May 2016 10:10:11 +0100 Subject: [PATCH] MacVim GUI 7.4.1832+ supports async diffs. --- README.mkd | 2 +- autoload/gitgutter/async.vim | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.mkd b/README.mkd index 5e92f23..68e0a85 100644 --- a/README.mkd +++ b/README.mkd @@ -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. diff --git a/autoload/gitgutter/async.vim b/autoload/gitgutter/async.vim index 443039c..bef80ec 100644 --- a/autoload/gitgutter/async.vim +++ b/autoload/gitgutter/async.vim @@ -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