[meld] filediff: Fix initial focus pane for two-pane comparison



commit 871d4e054cf09d836118e66cab2e26e12717cace
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Mon Sep 24 06:11:08 2018 +1000

    filediff: Fix initial focus pane for two-pane comparison
    
    This was a simple bad logic change from when I was reworking the logic
    around file loading. It's almost as though implicitly using Booleans as
    array indices is a bad idea.
    
    Regression was introduced in b0ba6344.

 meld/filediff.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index d4ecbb01..ac5066e8 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1272,7 +1272,7 @@ class FileDiff(MeldDoc, Component):
             yield i
         for i in self._diff_files():
             yield i
-        focus_pane = 0 if self.num_panes < 3 else 1
+        focus_pane = 0 if self.num_panes < 2 else 1
         self.textview[focus_pane].grab_focus()
 
     def set_meta(self, meta):


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