aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTakahiro Yoshihara2021-11-17 07:36:22 +0900
committerGitHub2021-11-17 07:36:22 +0900
commitd9388d89745bb30c20ad0051c53d301cd054f47c (patch)
treed27255f033d237ee4decb2ab38c63ea22da62fc0
parent61e964f2d168f52cb8e80e67d26605b52d726b16 (diff)
parentc95106192a9de3879292a570d7b8b9486075738b (diff)
downloadctrlp.vim-d9388d89745bb30c20ad0051c53d301cd054f47c.tar.gz

Merge pull request #579 from ctrlpvim/unescape-path

Unescape paths for GlobPath

Not all problematic cases are covered with this because of its complexity, but most of them are fixed. This is enough for now.

-rw-r--r--autoload/ctrlp.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index 38b6ed8..3d57546 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -428,7 +428,8 @@ endf
if has('patch-8.2-0995')
fu! s:GlobPath(dirs, depth)
let entries = []
- for e in split(a:dirs, ',')
+ let dirs = substitute(a:dirs, '\\\([%# ]\)', '\1', 'g')
+ for e in split(dirs, ',')
sil let files = readdir(e, '1', {'sort': 'none'})
if !s:showhidden | cal filter(files, 'v:val[0] != "."') | en
let entries += map(files, 'e.s:lash.v:val')