From ce66c1f78c87a2dcc8cb286d5536365b54d7e3ee Mon Sep 17 00:00:00 2001 From: Kamal Marhubi Date: Sun, 4 Oct 2020 09:04:50 -0400 Subject: [PATCH] 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. --- lua/telescope/previewers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/previewers.lua b/lua/telescope/previewers.lua index e28adce..100a59c 100644 --- a/lua/telescope/previewers.lua +++ b/lua/telescope/previewers.lua @@ -16,7 +16,7 @@ local Previewer = {} Previewer.__index = Previewer -- 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 command = {"bat"}