Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookmarked directory with a space in the name #454

Open
ViViDboarder opened this issue Jan 13, 2021 · 0 comments · May be fixed by #546
Open

Bookmarked directory with a space in the name #454

ViViDboarder opened this issue Jan 13, 2021 · 0 comments · May be fixed by #546

Comments

@ViViDboarder
Copy link

This may be the result of a bug in vim and neovim, but it appears that passing an escaped directory path to isdirectory results in a false negative. This prevents a bookmark such as /Path/To Directory from changing directories, though it will still open the directory in netrw.

I've done the following debugging:

let dir='/path/with space'
echo isdirectory(dir) => 1
echo isdirectory(fnameescape(dir)) => 0

This effects startify because the escaped path is passed into s:check_user_options(path) and the checks for isdirectory there prevent it from ever attempting to change directory.

Inconsistently, execute 'lcd' dir or execute 'lcd' fnameescape(dir) both work just fine. It only appears to be an issue with passing as a parameter. I also don't see a method for unescaping the path. I thought about using substitution, but that would break for Windows paths.

Not sure if there's another work around here besides renaming my directories.

ViViDboarder pushed a commit to ViViDboarder/vim-startify that referenced this issue Jun 28, 2023
This resolves the issue with passing escaped paths into functions that
don't support escaped paths. Eg. isdirectory()

Fixes mhinz#454
@ViViDboarder ViViDboarder linked a pull request Jun 28, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant