From d7305ad5e42050d3f848aefff59e275289663356 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Sat, 22 Jun 2024 03:46:37 -0700 Subject: [PATCH] feat: Ignore cogru sync --- undo-tree-vf.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/undo-tree-vf.el b/undo-tree-vf.el index 5b28f7a..d0e23f1 100644 --- a/undo-tree-vf.el +++ b/undo-tree-vf.el @@ -76,6 +76,12 @@ (when (undo-tree-vs--enabled-p) (undo-tree-kill-visualizer))) +;; +;; (@* "Externals" ) +;; + +(defvar cogru-inhibit-sync-hooks) + ;; ;; (@* "Util" ) ;; @@ -115,10 +121,11 @@ If `undo-tree-mode' is not valid, we call undo/redo function according to ARG" (declare (indent 1)) - `(if (or (not undo-tree-mode) (not undo-tree-vf-mode)) - (call-interactively (if ,arg undo-tree-vf-fallback-undo - undo-tree-vf-fallback-redo)) - ,@body)) + `(let ((cogru-inhibit-sync-hooks t)) + (if (or (not undo-tree-mode) (not undo-tree-vf-mode)) + (call-interactively (if ,arg undo-tree-vf-fallback-undo + undo-tree-vf-fallback-redo)) + ,@body))) (defun undo-tree-vf--visualize () "Call `undo-tree-visualize' only in window that has higher height."