summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorKamal Marhubi <kamal@marhubi.com>2020-10-04 09:04:50 -0400
committerGitHub <noreply@github.com>2020-10-04 09:04:50 -0400
commitce66c1f78c87a2dcc8cb286d5536365b54d7e3ee (patch)
treeaf83696ca783cc0d6df6ff0d6c18a8ab79b4776f /lua
parentc414e5f869ec325552e3a4699361da19a365a95f (diff)
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.
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/previewers.lua2
1 files changed, 1 insertions, 1 deletions
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"}