-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Rename should not include partial file extension in its selection. #7265
Comments
Should be fixed by #7242. Or will be fixed for file extensions that Brackets know. |
The culprit is |
The problem is that |
Yes. We can first try with the registered languages. And when none of them match, use lastIndexOf. We can also optimize the search by having an object with the registered extensions as the keys. Or a RegEx if can take less time. |
Should I rewrite |
I think that we could change that function so that we can fix it for other things, but using an array with extensions can be slow, so we need an alternative if we want to use this solution for things like the files tree. I am not sure how a regexp with all the extensions might work? or if not a an object? |
Object should be fast enough and then just check all parts of the file for match. I think that creating a regExp dynamically would be overly complicated. With object we'd have usually just 1-2 checks. |
@zaggino @TomMalbran Since |
What about creating |
@peterflynn see #7242 |
Reviewed - low priority @zaggino since PR with fix already in progress |
FBNC back to @RaymondLim. The original bug is fixed, and also the issue mentioned in this comment by @SAplayer is also fixed. |
Confirmed fixed. |
.html.erb
or.css.erb
or.config.json
.Result: Everything in the filename before the last dot is selected.
Expected: Should select only the filename and exclude everything from the first dot.
The text was updated successfully, but these errors were encountered: