Repository navigation
v1.5.1 - Improved text file detection
What's Changed
Improved text file detection (sidebar)
The sidebar now correctly identifies text files using a multi-stage content inspection algorithm, matching the approach used by content_inspector (the library powering bat):
- BOM detection — UTF-16/UTF-32 files with a Byte Order Mark are correctly recognized as text (previously could be misidentified as binary due to embedded NUL bytes)
- Magic bytes fast-reject — common binary formats (PNG, JPEG, GIF, PDF, ZIP, gzip, xz, bzip2, ELF, Mach-O, SQLite, RAR, 7-Zip, HDF5) are immediately blocked without needing a full content scan
- NUL byte scan — first 1024 bytes checked (up from 512); any NUL byte = binary
This fixes cases where files inside .git/ directories (e.g., HEAD, config, COMMIT_EDITMSG) and other extensionless text files could not be opened from the sidebar.
Full Changelog: v1.5.0...v1.5.1
Full Changelog: v1.5.0...v1.5.1