summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-03-12 01:05:53 (GMT)
committerMarius Kintel <marius@kintel.net>2013-03-12 01:05:53 (GMT)
commit9899f75a257c791c4272b60aa0c96e46f9acb16b (patch)
tree258e0205fd592e03bb6e00278b9dc30e3b6291b6 /src
parent4b7fe104f0fc9fb5fa06f6e29a75bfdae80cfd6c (diff)
Fixes problem where local changes are overwritten on automatic reload when included files has changed. Fixes #162
Diffstat (limited to 'src')
-rw-r--r--src/mainwin.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index c82e949..9cb59dd 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -1040,8 +1040,9 @@ bool MainWindow::compileTopLevelDocument(bool reload)
{
bool shouldcompiletoplevel = !reload;
- if ((reload && fileChangedOnDisk() && checkEditorModified()) ||
- includesChanged()) {
+ if (includesChanged()) shouldcompiletoplevel = true;
+
+ if (reload && fileChangedOnDisk() && checkEditorModified()) {
shouldcompiletoplevel = true;
refreshDocument();
}
contact: Jan Huwald // Impressum