vis: fast-jump: set tab stop and clear bg+
This commit is contained in:
@@ -45,7 +45,7 @@ local function merge(a, b)
|
|||||||
return c
|
return c
|
||||||
end
|
end
|
||||||
|
|
||||||
local function padding()
|
local function layout()
|
||||||
local l, r, t, n = 0, 0, 0, 0
|
local l, r, t, n = 0, 0, 0, 0
|
||||||
local opt = vis.win.options
|
local opt = vis.win.options
|
||||||
if opt.numbers or opt.relativenumbers then
|
if opt.numbers or opt.relativenumbers then
|
||||||
@@ -73,7 +73,7 @@ local function padding()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return t .. ',' .. r .. ',0,' .. (l + n)
|
return '--wrap --padding=' .. t .. ',' .. r .. ',0,' .. (l + n) .. ' --tabstop=' .. opt.tabwidth
|
||||||
end
|
end
|
||||||
|
|
||||||
local mu = #up_keys
|
local mu = #up_keys
|
||||||
@@ -168,7 +168,7 @@ local function jump(keys)
|
|||||||
end
|
end
|
||||||
input = input .. data:sub(k)
|
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
|
if code ~= 0 then
|
||||||
vis:info(err or ('fzf exit code ' .. code))
|
vis:info(err or ('fzf exit code ' .. code))
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user