vis: fast-jump: set tab stop and clear bg+

This commit is contained in:
2025-10-01 22:42:34 +02:00
parent b04611b199
commit 3f2951a1ea

View File

@@ -45,7 +45,7 @@ local function merge(a, b)
return c
end
local function padding()
local function layout()
local l, r, t, n = 0, 0, 0, 0
local opt = vis.win.options
if opt.numbers or opt.relativenumbers then
@@ -73,7 +73,7 @@ local function padding()
end
end
end
return t .. ',' .. r .. ',0,' .. (l + n)
return '--wrap --padding=' .. t .. ',' .. r .. ',0,' .. (l + n) .. ' --tabstop=' .. opt.tabwidth
end
local mu = #up_keys
@@ -168,7 +168,7 @@ local function jump(keys)
end
input = input .. data:sub(k)
local code, out, err = vis:pipe(input, 'fzf --ansi --layout=reverse-list --no-info --no-separator --color gutter:-1 --marker="" --wrap --padding ' .. padding() .. ' --print-query --bind change:accept')
local code, out, err = vis:pipe(input, 'fzf --ansi --layout=reverse-list --no-info --no-separator --color gutter:-1,bg+:-1 --marker="" ' .. layout() .. ' --print-query --bind change:accept')
if code ~= 0 then
vis:info(err or ('fzf exit code ' .. code))
else