Skip to content

Commit 7f46d62

Browse files
author
Sascha Goldhofer
committed
Update goto_file query to search a simplified path
1 parent a9febcd commit 7f46d62

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

command_goto_file.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ def run(self, edit):
3232
path = re.sub(project_folder, "", path)
3333

3434
path = re.sub("^[\\\\/\.]", "", path)
35+
# cleanup string, in case there are special characters for a path
36+
# e.g. webpack uses ~, which is not part of path
37+
path = re.sub("[^A-Za-z0-9 \-_\\\\/.%?#]*", "", path)
3538
files = state.find_file(path)
3639

3740
if len(files) == 0:

0 commit comments

Comments
 (0)