Skip to content

Commit 733b76b

Browse files
committed
fix(skim): more v1 compat
1 parent 5cc68a2 commit 733b76b

3 files changed

Lines changed: 26 additions & 7 deletions

File tree

lua/fzf-lua/config.lua

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -744,22 +744,38 @@ function M.normalize_opts(opts, globals, __resume_key) ---@diagnostic disable
744744
local bin, version, changelog = (function()
745745
if opts.__SK_VERSION then
746746
return "sk", opts.__SK_VERSION, {
747-
["1.5.3"] = { fzf_opts = { ["--algo"] = "frizbee" } },
747+
-- All fzf flag values not existing in skim
748+
["9.9.9"] = {
749+
fzf_opts = { ["--info"] = "inline-right" }
750+
},
751+
["1.5.3"] = {
752+
fzf_opts = {
753+
["--border"] = { "plain", "rounded", "double", "thick", "light-double-dashed",
754+
"heavy-double-dashed", "light-triple-dashed", "heavy-triple-dashed",
755+
"light-quadruple-dashed", "heavy-quadruple-dashed", "quadrant-inside",
756+
"quadrant-outside" },
757+
["--algo"] = "frizbee"
758+
}
759+
},
748760
["0.15.5"] = { fzf_opts = { ["--tmux"] = true } },
749-
["0.53"] = { fzf_opts = { ["--inline-info"] = true } },
761+
["0.53"] = {
762+
fzf_opts = {
763+
["--inline-info"] = true,
764+
["--algo"] = { "skim_v1", "skim_v2" },
765+
}
766+
},
750767
-- All fzf flags not existing in skim
751768
["all"] = {
752769
fzf_opts = {
753770
["--scheme"] = false,
754771
["--gap"] = false,
755-
["--info"] = false,
756-
["--border"] = false,
757772
["--scrollbar"] = false,
758773
["--no-scrollbar"] = false,
759774
["--wrap"] = true,
760775
["--wrap-sign"] = true,
761776
["--highlight-line"] = false,
762-
["--gutter"] = false,
777+
["--border-label"] = false,
778+
["--gutter"] = false,
763779
}
764780
},
765781
}

lua/fzf-lua/defaults.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ M.defaults = {
266266
["--border"] = "none",
267267
["--highlight-line"] = true,
268268
-- typo-resistant algo with skim >= v1.5.3
269-
["--algo"] = "frizbee",
269+
-- ["--algo"] = "frizbee",
270270
},
271271
---Options passed to fzf-tmux wrapper.
272272
fzf_tmux_opts = { ["-p"] = "80%,80%", ["--margin"] = "0,0" },

lua/fzf-lua/win.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,10 @@ function FzfWin:update_statusline()
16741674
end
16751675

16761676
function FzfWin:update_fzf_border_label()
1677-
if not self._o.fzf_opts["--border"] or self._o.fzf_opts["--border-label"] == false then
1677+
if not utils.has(self._o, "fzf", { 0, 35 })
1678+
or not self._o.fzf_opts["--border"]
1679+
or self._o.fzf_opts["--border-label"] == false
1680+
then
16781681
return
16791682
end
16801683
---@type string|table

0 commit comments

Comments
 (0)