Editor autocomplete replaces <directory>/.gitignore with just .gitignore
Summary
I wanted to create a directory in Git, and with the knowledge of a placeholder like .gitignore, I've opened the editor to add a new file.
Using images/.gitignore the auto-complete template detection always replaces this with just .gitignore, it doesn't let you edit this anymore.
If you pick images/.gitkeep instead, this works.
Steps to reproduce
- Create or modify an existing repository, best empty
- Add a new file
- Use
images/.gitignoreas path, but type it character by character - See auto-complete replacing it
To be honest, I've found out that creating a new directory is a GitLab action from the menu available too. Didn't know that beforehand.
Example Project
Not possible, it is a live action in the editor everyone sees.
What is the current bug behavior?
JS autocomplete replaces the file name including a directory, but only with .gitignore in the path.
What is the expected correct behavior?
Keep the path since this also works in the editor and Web IDE :)
Relevant logs and/or screenshots
See above.
Output of checks
This bug happens on GitLab.com
Possible fixes
Allow path pre-pending for .gitignore template matches in the auto-complete code.


