Kaydet (Commit) 3b559efb authored tarafından Nick Treleaven's avatar Nick Treleaven

Execute: only save file if the run command uses it

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@449 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 14e69665
......@@ -2,6 +2,7 @@
* src/notebook.c, src/notebook.h, src/main.c, src/Makefile.am:
Added currently disabled drag reordering of notebook tabs.
* src/callbacks.c: Execute: only save file if the run command uses it.
2006-06-15 Enrico Troeger <enrico.troeger@uvena.de>
......
......@@ -1635,7 +1635,10 @@ on_build_execute_activate (GtkMenuItem *menuitem,
}
else
{
if (doc_list[idx].changed) document_save_file(idx);
// save the file only if the run command uses it
if (doc_list[idx].changed &&
strstr(doc_list[idx].file_type->programs->run_cmd, "%f") != NULL)
document_save_file(idx);
if (build_run_cmd(idx) == (GPid) 0)
{
msgwin_status_add(_("Failed to execute the terminal program"));
......
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