fix: Pass --paging=always to bat (#142)

This gets rid of a slightly annoying difference between files that fit
in the preview pane and ones that don't: hitting the scroll-preview
mappings would complain about a closed stream. Always using the pager
ensures there's always a process at the other end, even if asking it
to scroll doesn't actually do anything.
This commit is contained in:
Kamal Marhubi
2020-10-04 09:04:50 -04:00
committed by GitHub
parent c414e5f869
commit ce66c1f78c

View File

@@ -16,7 +16,7 @@ local Previewer = {}
Previewer.__index = Previewer Previewer.__index = Previewer
-- TODO: Should play with these some more, ty @clason -- TODO: Should play with these some more, ty @clason
local bat_options = {"--style=plain", "--color=always"} local bat_options = {"--style=plain", "--color=always", "--paging=always"}
local bat_maker = function(filename, lnum, start, finish) local bat_maker = function(filename, lnum, start, finish)
local command = {"bat"} local command = {"bat"}