davidbalbert / Watt

A high performance text editor for macOS.
MIT License
57 stars 2 forks source link

Reload files when edited by apps that don't use NSFileCoordinator (TextMate, vim, etc.) #115

Closed davidbalbert closed 7 months ago

davidbalbert commented 9 months ago

Right now, AppKit calls Document.read(from:ofType:) if a file was edited by another app, but only if that app is using the Cocoa Document Architecture or using NSFileCoordinator directly.

TextMate (surprisingly!) rolls its own document class (OakDocument) that is a subclass of NSObject, not NSDocument, and it doesn't use NSFileCoordinator, so Watt can't see its updates.

Less surprisingly, Vim (and any other CLI tool) doesn't use NSFileCoordinator either, so we can't see its updates.

This from Jesse might be helpful.

davidbalbert commented 7 months ago

Fixed by #116