getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
14.16k stars 968 forks source link

Catch editing events emitted by Nova on macOS #2672

Closed jamiedumont closed 1 month ago

jamiedumont commented 1 month ago

As per the bug report https://github.com/getzola/zola/issues/2663, I've added a branch to the match expression to catch EventKind::Modify(ModifyKind::Name(RenameMode::Any)) events made by Nova on macOS when editing files.

It appears that this is the only event that makes it to meaningful_events: HashMap<PathBuf, (PathBuf, SimpleFileSystemEventKind, ChangeKind)> when using Nova.

In testing this change, I discovered that other editors including Helix 24.7 and Vim 9.0.2142 also emit this event, but go on to emit others.

This change didn't introduce problems when editing with:

Let me know if you want further testing (or tests) added.

Cheers, Jamie.

jamiedumont commented 1 month ago

Just realised my branch is based on main and bringing in other commits. Apologies. I’ll close this and make a new PR based on next.