emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] scratch/add-vdiff f11c7c2 257/258: vdiff: Fix vdiff-buffers windo


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff f11c7c2 257/258: vdiff: Fix vdiff-buffers window layout
Date: Wed, 17 May 2017 08:14:03 -0400 (EDT)

branch: scratch/add-vdiff
commit f11c7c2eeef33a0b75fe4e025818e7e672c57397
Author: Justin Burkett <address@hidden>
Commit: Justin Burkett <address@hidden>

    vdiff: Fix vdiff-buffers window layout
    
    When split-width-threshold is too small the window was getting split twice 
with
    the call to switch-to-buffer-other-window. The new method ensures that the 
split
    only happens once.
    
    See #15
---
 vdiff.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index 6a7fc11..b2c5e91 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1671,11 +1671,11 @@ function for ON-QUIT to do something useful with the 
result."
         (buffer-b (get-buffer buffer-b)))
     (delete-other-windows)
     (switch-to-buffer buffer-a)
-    (save-selected-window
-      (if horizontal
-          (split-window-vertically)
-        (split-window-horizontally))
-      (switch-to-buffer-other-window buffer-b))
+    (set-window-buffer
+       (if horizontal
+           (split-window-vertically)
+         (split-window-horizontally))
+       buffer-b)
     (setq vdiff--temp-session
           (vdiff--init-session
            buffer-a buffer-b nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]