Save file only if it's modified

master
Yevgen Muntyan 2006-10-12 21:40:59 -05:00
parent 1d613bc3cd
commit d5bfc26783
1 changed files with 6 additions and 1 deletions

View File

@ -147,8 +147,13 @@ class Plugin(moo.edit.Plugin):
def run_file(self, window):
doc = window.get_active_doc()
if not doc or not doc.save():
if not doc:
return
if not doc.get_filename() or doc.get_status() & moo.edit.EDIT_MODIFIED:
if not doc.save():
return
pane = self.ensure_output(window)
if pane.output.running():