Commit 8a085638 authored by Kai Willadsen's avatar Kai Willadsen

filediff: Check for unsaved changes on encoding reload (ggo#151)

We're reusing the revert dialog here, because that's actually what is
happening. We could come up with a new one (or include a bit more
explanatory text) but I feel like it's... fairly clear what's happening?
I hope...
parent b09ede87
Pipeline #2214 failed with stages
in 15 minutes and 22 seconds
......@@ -233,6 +233,8 @@ class FileDiff(MeldDoc, Component):
GObject.BindingFlags.DEFAULT)
def reload_with_encoding(widget, encoding, pane):
if not self.check_unsaved_changes():
return
self.set_file(pane, self.textbuffer[pane].data.gfile, encoding)
def go_to_line(widget, line, pane):
......
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