branch: externals/diff-hl
commit bdbdbbf87f64719d94b99489a65d9c9f7d296251
Merge: 0574c3247c c596e65577
Author: Dmitry Gutov <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #257 from wyuenho/fix-256
    
    fix #256: prevent diff-hl-inline-popup-hide from being called twice
---
 diff-hl-show-hunk.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/diff-hl-show-hunk.el b/diff-hl-show-hunk.el
index 45f201c90e..578ffa75a0 100644
--- a/diff-hl-show-hunk.el
+++ b/diff-hl-show-hunk.el
@@ -232,7 +232,9 @@ Returns a list with the buffer and the line number of the 
clicked line."
 (defun diff-hl-show-hunk-inline-popup (buffer &optional _ignored-line)
   "Implementation to show the hunk in a inline popup.
 BUFFER is a buffer with the hunk."
-  (diff-hl-inline-popup-hide)
+  ;; prevent diff-hl-inline-popup-hide from being called twice
+  (let ((diff-hl-inline-popup--close-hook nil))
+    (diff-hl-inline-popup-hide))
   (setq diff-hl-show-hunk--hide-function #'diff-hl-inline-popup-hide)
   (let* ((lines (split-string (with-current-buffer buffer (buffer-string)) 
"[\n\r]+" ))
          (smart-lines diff-hl-show-hunk-inline-popup-smart-lines)

Reply via email to