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

    Better way to trigger other window update
---
 vdiff.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index 13685ea..d93ccb2 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -754,11 +754,10 @@ buffer and center both buffers at this line."
   (when (and (memq real-this-command vdiff-mirrored-commands)
              (not vdiff--in-post-command-hook)
              (vdiff--buffer-p))
-    ;; New Strategy: Use (message nil) to just force a redisplay in other
-    ;; window. This is the only way I've figured out how to reliably do this so
-    ;; far. I don't know why (redisplay t) and similar calls don't work here.
+    ;; New Strategy: Just force a redisplay in other window and let
+    ;; `vdiff--scroll-function' do the work.
     (let ((vdiff--in-post-command-hook t))
-      (vdiff--with-other-window (message nil)))
+      (force-window-update (vdiff--other-window)))
 
     ;; Old strategy: Execute command in other buffer, which worked but it 
wasn't
     ;; easy to keep the cursors aligned.

Reply via email to