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

E944 when opening a file in a directory named "[a-1]" #303

Open
cwfoo opened this issue Apr 26, 2021 · 0 comments
Open

E944 when opening a file in a directory named "[a-1]" #303

cwfoo opened this issue Apr 26, 2021 · 0 comments

Comments

@cwfoo
Copy link

cwfoo commented Apr 26, 2021

Describe the bug

When trying to open a file that is inside a directory named "[a-1]", an error occurs: E944: Reverse range in character class.

Steps to reproduce

  1. cd ~
  2. mkdir '[a-1]'
  3. vim '[a-1]/blabla.txt'
    An error occurs:
    Error detected while processing function gutentags#setup_gutentags[38]..gutentags#get_project_root[4]..gutentags#default_get_project_root:
    line   15:
    E944: Reverse range in character class
    

Share your setup

  • Ubuntu 20.04
  • Vim 8.1.2269
  • vim-gutentags 50705e8 (2020-05-22)

Post the logs

Irrelevant because no logs are produced.

Additional context

The problem is likely caused by calls to globpath() that fail to escape file wildcards (see :h wildcards) prior to globbing. Example of a problematic line:

if !empty(globpath(l:path, root, 1))

Perhaps the solution is to use fnameescape() to escape wildcard characters, but I don't know enough about these things to comment further.

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

No branches or pull requests

1 participant