Commit f0621a0a authored by Kai Willadsen's avatar Kai Willadsen

filediff: Add new set_file() API for setting a single file/pane

parent 9b92209a
......@@ -1061,6 +1061,16 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
for pane, gfile, encoding in files:
self.load_file_in_pane(pane, gfile, encoding)
def set_file(
self,
pane: int,
gfile: Gio.File,
encoding: GtkSource.Encoding = None):
self._disconnect_buffer_handlers()
self.undosequence.clear()
self.linediffer.clear()
self.load_file_in_pane(pane, gfile, encoding)
def load_file_in_pane(
self,
pane: int,
......
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