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



commit 592bc33aba5b05ce62081279f8433c8b6bc576f5
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 3e75083e..08a28c6f 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1142,7 +1142,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.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]