antonmedv / walk

Terminal file manager
MIT License
3.22k stars 89 forks source link

add ability to preview directories #83

Closed ardnew closed 1 year ago

ardnew commented 1 year ago

Currently an empty view is displayed when preview is enabled with a directory selected.

This change will display the selected directory contents in the preview window.

Just like for regular files, which are limited to 1024 bytes content preview, the directory reader will only buffer 1024 bytes of file names from a directory (including the line delimiters). This should keep the preview functionality very fast even on large directories with many files.

antonmedv commented 1 year ago

Done.