This commit is contained in:
Alexey Kudravtsev
2014-10-14 19:09:56 +04:00
parent 31a223eb89
commit 6acf7a1fb4
@@ -632,8 +632,10 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Virt
documentEx.setReadOnly(false);
LoadTextUtil.setCharsetWasDetectedFromBytes(file, null);
file.setBOM(null); // reset BOM in case we had one and the external change stripped it away
documentEx.replaceText(LoadTextUtil.loadText(file), file.getModificationStamp());
documentEx.setReadOnly(!wasWritable);
if (!file.getFileType().isBinary()) {
documentEx.replaceText(LoadTextUtil.loadText(file), file.getModificationStamp());
documentEx.setReadOnly(!wasWritable);
}
}
}
);