Closed BourgeoisBear closed 2 years ago
Do you use latest commit?
yes
edit: my current revision is fc153aabd54f9189e576c9bfb07bac09f36f2ccd
BTW, in my environment, line 432 seems not be same as your.
I added debugging junk above which changed the line #. It's also 428 on my side. Sorry!
I don't reproduce this on Ubuntu. Do you set options for CtrlP others?
Debian Bullseye, x86_64, disabled all plugins, reduced vimrc
to:
let g:ctrlp_use_caching = 0
let g:ctrlp_working_path_mode = 'rw'
let g:ctrlp_root_markers = ['.profile']
let g:ctrlp_switch_buffer = "et"
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files'],
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
\ 3: ['.profile'],
\ },
\ }
This is run from my home directory by the way, so I believe it is using the fallback to globpath()
. Same problem if I remove the 3rd type:
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files'],
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
\ },
\ }
Hmm, I don't get repro.
Simplified case:
mkdir test
cd test
mkdir "Gravity Falls"
mkdir "Test, Dippy Fresh"
vim
In Vim: :CtrlP :messages
Messages maintainer: Bram Moolenaar <Bram@vim.org>
Error detected while processing function ctrlp#init[31]..<SNR>18_setlines_post[6]..ctrlp#files[8]..<SNR>18_GlobPath[13]
..<SNR>18_GlobPath:
line 4:
E484: Can't open file /home/jstewart/test/Test
E484: Can't open file Dippy Fresh
Press ENTER or type command to continue
Now I could reproduce this. It related to ,
. And it seems to be original BUG.
Last commit eliminates most of the errors, but there are a few stragglers when I :CtrlP
from my home directory:
Messages maintainer: Bram Moolenaar <Bram@vim.org>
Error detected while processing function ctrlp#init[31]..<SNR>84_setlines_post[6]..ctrlp#files[3]..<SNR>84_lsCmd:
line 26:
E684: list index out of range: 1
Error detected while processing function ctrlp#init[31]..<SNR>84_setlines_post[6]..ctrlp#files[8]..<SNR>84_GlobPath[13]
..<SNR>84_GlobPath[13]..<SNR>84_GlobPath[13]..<SNR>84_GlobPath:
line 9:
E944: Reverse range in character class
E944: Reverse range in character class
Press ENTER or type command to continue
This is already fixed.
Debian bullseye Vim 8.2 has patch 8.2.0995
When using the latest version, without fallbacks for
g:ctrlp_user_command
:Only triggered for files/folders with spaces in the name.
NOTE: works correctly if I i change line 428 in
autoload/ctrlp.vim
to:I believe files/paths with commas in the name will also break this.
edit: corrected line number for any future participants