mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-06-04 03:36:04 +00:00
fix: handle windows file paths as uris (#2640)
* fix: handle windows file paths as uris
* nit: rename FILE_PATH_PATTERN to WINDOWS_ROOT_PATTERN
(cherry picked from commit bc2330bc9c)
This commit is contained in:
committed by
Simon Hauser
parent
947cb46344
commit
1384b2e99b
@@ -194,8 +194,11 @@ utils.is_path_hidden = function(opts, path_display)
|
||||
end
|
||||
|
||||
local URI_SCHEME_PATTERN = "^([a-zA-Z]+[a-zA-Z0-9.+-]*):.*"
|
||||
local WINDOWS_ROOT_PATTERN = "^[a-zA-Z]:\\"
|
||||
utils.is_uri = function(filename)
|
||||
return filename:match(URI_SCHEME_PATTERN) ~= nil
|
||||
local is_uri_match = filename:match(URI_SCHEME_PATTERN) ~= nil
|
||||
local is_windows_root_match = filename:match(WINDOWS_ROOT_PATTERN)
|
||||
return is_uri_match and not is_windows_root_match
|
||||
end
|
||||
|
||||
local calc_result_length = function(truncate_len)
|
||||
|
||||
Reference in New Issue
Block a user