Skip to content

Commit cac5409

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

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

lua/fzf-lua/config.lua

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -744,22 +744,37 @@ 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+
["1.5.3"] = {
749+
fzf_opts = {
750+
["--border"] = { "plain", "rounded", "double", "thick", "light-double-dashed",
751+
"heavy-double-dashed", "light-triple-dashed", "heavy-triple-dashed",
752+
"light-quadruple-dashed", "heavy-quadruple-dashed", "quadrant-inside",
753+
"quadrant-outside" },
754+
["--algo"] = "frizbee"
755+
}
756+
},
748757
["0.15.5"] = { fzf_opts = { ["--tmux"] = true } },
749-
["0.53"] = { fzf_opts = { ["--inline-info"] = true } },
758+
["0.53"] = {
759+
fzf_opts = {
760+
["--inline-info"] = true,
761+
["--algo"] = { "skim_v1", "skim_v2" },
762+
}
763+
},
750764
-- All fzf flags not existing in skim
751765
["all"] = {
752766
fzf_opts = {
753767
["--scheme"] = false,
754768
["--gap"] = false,
755-
["--info"] = false,
756-
["--border"] = false,
757769
["--scrollbar"] = false,
758770
["--no-scrollbar"] = false,
759771
["--wrap"] = true,
760772
["--wrap-sign"] = true,
761773
["--highlight-line"] = false,
762-
["--gutter"] = false,
774+
["--gutter"] = false,
775+
["--border-label"] = false,
776+
["--border"] = { "none" },
777+
["--info"] = { "inline-right" },
763778
}
764779
},
765780
}

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)