Disable external diff tools when diffing buffer

There is a bug that causes `:git show-diff` to fail when using an external diff, for example difftastic.

This change ensures that we don't use an external diff tool when diffing the current buffer.
This commit is contained in:
Andrew Vos 2022-04-12 16:26:38 +01:00 committed by GitHub
parent 90db664635
commit 0f966e656b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,7 +157,7 @@ define-command -params 1.. \
update_diff() { update_diff() {
( (
cd_bufdir cd_bufdir
git --no-pager diff -U0 "$kak_buffile" | perl -e ' git --no-pager diff --no-ext-diff -U0 "$kak_buffile" | perl -e '
$flags = $ENV{"kak_timestamp"}; $flags = $ENV{"kak_timestamp"};
foreach $line (<STDIN>) { foreach $line (<STDIN>) {
if ($line =~ /@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))?/) { if ($line =~ /@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))?/) {