Skip to content

v1.11.2 — 他のアプリでの変更を自動で読み込む

Choose a tag to compare

@MR-TABATA MR-TABATA released this 14 Aug 10:57
· 73 commits to main since this release

他のアプリで直したのに、こちらは古い中身を見せ続けていた。エディタで書き換える・sed を回す・ブランチを切り替える —— ファイルは変わっているのに、開いたままの MrEditor は何も言わなかった。

  • 開いているファイルを見張り、未保存の変更が無ければその場で読み込み直す(キャレットとスクロール位置は保つ)。
  • 未保存なら潰さない。 「このファイルは他のアプリで変更されました」と帯で知らせ、読み込むかどうかを選ばせる。
  • 巨大ファイルは追記された分だけ索引を伸ばすtail -f と同じ経路)。10 GB のログが 1 行増えるたびに 8 秒かけて張り直すことはしない。
  • 監視は stat だけで内容を読まないので、10 GB を開いていてもコストは無視できる。書き込み途中を掴まないよう、同じ版を 2 回見てから取り込む。
  • 環境設定 ▸ 一般でオフにできる。オフでも帯は出す(古い内容を黙って見せ続けない)。

あわせて、追記を取り込んだ後に編集すると追記分が消える穴を塞いだ(末尾追従にも前からあった)。


Fix it in another app and this one kept showing you the old bytes.

  • Open files are watched: with no unsaved changes, the new contents load in place, keeping your caret and scroll position.
  • With unsaved changes nothing is overwritten — a banner says the file changed and lets you decide.
  • A large file that only grew extends its index instead of being reopened, so a 10 GB log does not pay 8 seconds per append.
  • Watching costs one stat per file — the contents are never read — and a change is taken only after the same version is seen twice, so a half-written file is never loaded.
  • Preferences ▸ General turns the automatic part off; the banner still appears.

Also fixes a hole where text appended by another process vanished the moment you started editing (Follow mode had it too).

macOS 13+ · Apple Silicon / Intel universal · Developer ID 署名 + 公証済み