Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc051ea8

Browse files
authored
refactor(lua): replace hard-coded gsub with vim.pesc() (#18407)
1 parent815b65d commitc051ea8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎runtime/lua/vim/filetype.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ local function normalize_path(path, as_pattern)
14901490
ifas_patternthen
14911491
-- Escape Lua's metacharacters when $HOME is used in a pattern.
14921492
-- The rest of path should already be properly escaped.
1493-
normal=vim.env.HOME:gsub('[-^$()%%.%[%]+?]','%%%0')..normal:sub(2)
1493+
normal=vim.pesc(vim.env.HOME)..normal:sub(2)
14941494
else
14951495
normal=vim.env.HOME..normal:sub(2)
14961496
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp