Commit bab6479d authored by Kai Willadsen's avatar Kai Willadsen

filediff: Handle initial loads for missing gfiles

This can happen if e.g., the user selects one file in the new comparison
UI but leaves the other blank. Without the buffer-is-loaded logic
addition here, the UI just stalls in a loading state.
parent cd5d0958
......@@ -1057,11 +1057,12 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
encodings = encodings or ((None,) * len(gfiles))
files = [
(pane, gfile, encoding)
for pane, (gfile, encoding) in enumerate(zip(gfiles, encodings))
if gfile
files = []
for pane, (gfile, encoding) in enumerate(zip(gfiles, encodings)):
if gfile:
files.append((pane, gfile, encoding))
self.textbuffer[pane].data.loaded = True
if not files:
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