choose-files: Reject stale preview cache writes

Recheck the path key before updating the cache. Include the inode so a replacement with the same size and modification time gets a different key. Version the key to invalidate previously cached previews.

Retry once when a changed path still resolves to a regular file.
This commit is contained in:
Zhizhen He 2026-11-17 20:47:47 +08:00
parent 24fdd01944
commit bc7d4664d8
6 changed files with 132 additions and 20 deletions

View file

@ -196,6 +196,9 @@ Detailed list of changes
they cannot inject escape codes into the terminal. Fix hangs previewing
special files and various preview caching bugs (:pull:`10843`, :pull:`10850`)
- :doc:`choose-files <kittens/choose-files>`: Fix incorrect cached previews
when a file or symlink changes during rendering.
- IME: Move cursor position within pre-edit text (:iss:`10807`)
- Bash integration: Find system wide startup files by scanning the bash