Skip to content

Commit

Permalink
feat: support Windows path for file button
Browse files Browse the repository at this point in the history
  • Loading branch information
spywhere authored and goolord committed Apr 8, 2022
1 parent 4403689 commit 6655228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/alpha/themes/startify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ local function file_button(fn, sc, short_fn)
ico_txt = ""
end
local file_button_el = button(sc, ico_txt .. short_fn, "<cmd>e " .. fn .. " <CR>")
local fn_start = short_fn:match(".*/")
local fn_start = short_fn:match(".*[/\\]")
if fn_start ~= nil then
table.insert(fb_hl, { "Comment", #ico_txt - 2, #fn_start + #ico_txt - 2 })
end
Expand Down
2 changes: 1 addition & 1 deletion lua/alpha/themes/theta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ local function file_button(fn, sc, short_fn)
ico_txt = ""
end
local file_button_el = dashboard.button(sc, ico_txt .. short_fn, "<cmd>e " .. fn .. " <CR>")
local fn_start = short_fn:match(".*/")
local fn_start = short_fn:match(".*[/\\]")
if fn_start ~= nil then
table.insert(fb_hl, { "Comment", #ico_txt - 2, #fn_start + #ico_txt })
end
Expand Down

0 comments on commit 6655228

Please sign in to comment.