Commit 89eecb55 authored by Phil Hughes's avatar Phil Hughes

fixed dirty diff not computing after commit

parent be8ea56e
...@@ -67,8 +67,8 @@ export default class Model { ...@@ -67,8 +67,8 @@ export default class Model {
} }
updateContent(content) { updateContent(content) {
this.getModel().setValue(content);
this.getOriginalModel().setValue(content); this.getOriginalModel().setValue(content);
this.getModel().setValue(content);
} }
dispose() { dispose() {
......
...@@ -89,6 +89,8 @@ export const updateFilesAfterCommit = ( ...@@ -89,6 +89,8 @@ export const updateFilesAfterCommit = (
lastCommit, lastCommit,
}, { root: true }); }, { root: true });
eventHub.$emit(`editor.update.model.content.${entry.path}`, entry.content);
commit(rootTypes.SET_FILE_RAW_DATA, { commit(rootTypes.SET_FILE_RAW_DATA, {
file: entry, file: entry,
raw: entry.content, raw: entry.content,
...@@ -98,8 +100,6 @@ export const updateFilesAfterCommit = ( ...@@ -98,8 +100,6 @@ export const updateFilesAfterCommit = (
file: entry, file: entry,
changed: false, changed: false,
}, { root: true }); }, { root: true });
eventHub.$emit(`editor.update.model.content.${entry.path}`, entry.raw);
}); });
commit(rootTypes.REMOVE_ALL_CHANGES_FILES, null, { root: true }); commit(rootTypes.REMOVE_ALL_CHANGES_FILES, null, { root: true });
......
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