mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[peter] doc stamp and file stamp difference actually matters for isFileModified (otherwise asterisk will be shown after undo)
This commit is contained in:
+2
-2
@@ -234,7 +234,7 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Appl
|
||||
try {
|
||||
VirtualFile file = getFile(document);
|
||||
|
||||
if (file == null || !file.isValid() || file instanceof LightVirtualFile || !isDocumentUnsaved(document) || document.getModificationStamp() == file.getModificationStamp()) {
|
||||
if (file == null || !file.isValid() || file instanceof LightVirtualFile || !isFileModified(file)) {
|
||||
myUnsavedDocuments.remove(document);
|
||||
fireUnsavedDocumentsDropped();
|
||||
LOG.assertTrue(!myUnsavedDocuments.contains(document));
|
||||
@@ -355,7 +355,7 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Appl
|
||||
|
||||
public boolean isFileModified(@NotNull VirtualFile file) {
|
||||
final Document doc = getCachedDocument(file);
|
||||
return doc != null && isDocumentUnsaved(doc);
|
||||
return doc != null && isDocumentUnsaved(doc) && doc.getModificationStamp() != file.getModificationStamp();
|
||||
}
|
||||
|
||||
public void addFileDocumentSynchronizationVetoer(@NotNull FileDocumentSynchronizationVetoListener vetoer) {
|
||||
|
||||
Reference in New Issue
Block a user