summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Gutov <dmitry@gutov.dev>2026-04-28 02:29:44 +0300
committerDmitry Gutov <dmitry@gutov.dev>2026-04-28 02:29:44 +0300
commit7d873b2f58908de1ea2f499da9bf993e088953d7 (patch)
tree5cd7771eff4cb1bba13a92c3cb5551d094c1ef7b
parentd0076b893a610cf068bc5ba488d067ea687f1fa8 (diff)
flydiff: Don't try to update buffers in certain VC statesexternals/diff-hl
Those that indicate that there is no VC revision that includes the current file. Resolves #226
-rw-r--r--diff-hl-flydiff.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index 1a6b11f..4e97481 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015-2025 Free Software Foundation, Inc. -*- lexical-binding: t -*-
+;; Copyright (C) 2015-2026 Free Software Foundation, Inc. -*- lexical-binding: t -*-
;; Author: Jonathan Hayase <PythonNut@gmail.com>
;; URL: https://github.com/dgutov/diff-hl
@@ -57,8 +57,9 @@
(not (file-exists-p buffer-file-name)))
(diff-hl-update)))
-(defun diff-hl-flydiff/modified-p (_state)
- (buffer-modified-p))
+(defun diff-hl-flydiff/modified-p (state)
+ (unless (memq state '(added missing nil))
+ (buffer-modified-p)))
;;;###autoload
(define-minor-mode diff-hl-flydiff-mode