feat: use scratch buffer for file previews (#467)
* Initial implementation of scratch based preview * Fix call to buf is valid in loop * Fixing call to be made only from the main event loop * Improve handling of large files from @pkazmier * Better error handling and simplifying the code * Default to old behavior * Add documentation * Fix readfile * Fix the configuration * refactor: single config enum and load real buffer on BufEnter * doc: regenerate documentation --------- Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
This commit is contained in:
parent
8ea40b5506
commit
21705a1deb
5 changed files with 79 additions and 21 deletions
|
|
@ -157,8 +157,8 @@ CONFIG *oil-confi
|
|||
preview_win = {
|
||||
-- Whether the preview window is automatically updated when the cursor is moved
|
||||
update_on_cursor_moved = true,
|
||||
-- Maximum file size in megabytes to preview
|
||||
max_file_size_mb = 100,
|
||||
-- How to open the preview window "load"|"scratch"|"fast_scratch"
|
||||
preview_method = "fast_scratch",
|
||||
-- Window-local options to use for preview window buffers
|
||||
win_options = {},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue