Skip to content

Commit 7d873b2

Browse files
committed
flydiff: Don't try to update buffers in certain VC states
Those that indicate that there is no VC revision that includes the current file. Resolves #226
1 parent d0076b8 commit 7d873b2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

diff-hl-flydiff.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;; Copyright (C) 2015-2025 Free Software Foundation, Inc. -*- lexical-binding: t -*-
1+
;; Copyright (C) 2015-2026 Free Software Foundation, Inc. -*- lexical-binding: t -*-
22

33
;; Author: Jonathan Hayase <PythonNut@gmail.com>
44
;; URL: https://github.com/dgutov/diff-hl
@@ -57,8 +57,9 @@
5757
(not (file-exists-p buffer-file-name)))
5858
(diff-hl-update)))
5959

60-
(defun diff-hl-flydiff/modified-p (_state)
61-
(buffer-modified-p))
60+
(defun diff-hl-flydiff/modified-p (state)
61+
(unless (memq state '(added missing nil))
62+
(buffer-modified-p)))
6263

6364
;;;###autoload
6465
(define-minor-mode diff-hl-flydiff-mode

0 commit comments

Comments
 (0)