Skip to content

Commit

Permalink
hoge
Browse files Browse the repository at this point in the history
  • Loading branch information
delphinus committed Jan 25, 2024
1 parent 84d61e8 commit 855d3da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lua/frecency/os_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ local M = {
is_windows = uv.os_uname().sysname == "Windows_NT",
}

---@param filename string
---@return string
---@type fun(filename: string): string
M.normalize_sep = M.is_windows
and function(filename)
if not filename:find("/", 1, true) or filename:match "^%a+://" then
Expand All @@ -21,8 +20,7 @@ M.normalize_sep = M.is_windows

--- Join path segments into a single path string.
--- NOTE: Do not use vim.fs.joinpath because it does not work on Windows.
---@param ... string
---@return string
---@type fun(...: string): string
M.join_path = M.is_windows and function(...)
return M.normalize_sep(Path:new(...).filename)
end or function(...)
Expand Down
1 change: 1 addition & 0 deletions lua/frecency/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
---@field absolute fun(): string
---@field is_file fun(self: PlenaryPath): boolean
---@field filename string
---@field joinpath fun(self: PlenaryPath, ...): PlenaryPath
---@field make_relative fun(self: PlenaryPath, cwd: string): string
---@field parent PlenaryPath
---@field path { sep: string }
Expand Down

0 comments on commit 855d3da

Please sign in to comment.