Check for hidden dirty child on close

Fixes: #11405
This commit is contained in:
Juergen Spitzmueller 2018-12-17 09:11:34 +01:00
parent ab5c08b3f0
commit f87218bbb5

View File

@ -3069,9 +3069,13 @@ bool GuiView::closeBuffer(Buffer & buf)
break; break;
} else { } else {
// In this case the child buffer is open but hidden. // In this case the child buffer is open but hidden.
// It therefore should not (MUST NOT) be dirty! // Even in this case, children can be dirty (e.g.,
LATTEST(child_buf->isClean()); // after a label change in the master, see #11405).
theBufferList().release(child_buf); // Therefore, check this.
if (saveBufferIfNeeded(*child_buf, false)) {
child_buf->removeAutosaveFile();
theBufferList().release(child_buf);
}
} }
} }
} }