Commit 085d9b18 authored by Kai Willadsen's avatar Kai Willadsen

Make the Differ a class variable to avoid future initialisation woes

parent 22b9a31c
......@@ -101,6 +101,8 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
"""Two or three way diff of text files.
"""
differ = diffutil.Differ
keylookup = {gtk.keysyms.Shift_L : MASK_SHIFT,
gtk.keysyms.Control_L : MASK_CTRL,
gtk.keysyms.Shift_R : MASK_SHIFT,
......@@ -139,7 +141,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
self._connect_buffer_handlers()
self._sync_vscroll_lock = False
self._sync_hscroll_lock = False
self.linediffer = diffutil.Differ()
self.linediffer = self.differ()
self.linediffer.ignore_blanks = self.prefs.ignore_blank_lines
self._inline_cache = set()
self._cached_match = CachedSequenceMatcher()
......
......@@ -24,9 +24,10 @@ MASK_SHIFT, MASK_CTRL = 1, 2
class FileMerge(filediff.FileDiff):
differ = merge.AutoMergeDiffer
def __init__(self, prefs, num_panes):
filediff.FileDiff.__init__(self, prefs, num_panes)
self.linediffer = merge.AutoMergeDiffer()
self.hidden_textbuffer = gtk.TextBuffer()
def _connect_buffer_handlers(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment