branch: scratch/add-vdiff
commit 750a1bc0f11ca75d65d475a57a6e27978cdd2271
Author: justbur <[email protected]>
Commit: justbur <[email protected]>

    Fix bug in remove-refinements
---
 vdiff.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index 81b132d..93fa233 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -500,11 +500,12 @@ SYNTAX-CODE."
   (interactive (list (vdiff--overlay-at-pos)))
   (dolist (chg-ovr (list ovr
                          (overlay-get ovr 'vdiff-other-overlay)))
-    (dolist (sub-ovr (overlays-in
-                      (overlay-start chg-ovr)
-                      (overlay-end chg-ovr)))
-      (when (overlay-get sub-ovr 'vdiff-refinement)
-        (delete-overlay sub-ovr)))))
+    (with-current-buffer (overlay-buffer chg-ovr)
+      (dolist (sub-ovr (overlays-in
+                        (overlay-start chg-ovr)
+                        (overlay-end chg-ovr)))
+        (when (overlay-get sub-ovr 'vdiff-refinement)
+          (delete-overlay sub-ovr))))))
 
 (defun vdiff-refine-all-hunks (&optional syntax-code)
   "Highlight word differences in all hunks.

Reply via email to