Exclude file ext from initial selection when renaming a file.#7209
Exclude file ext from initial selection when renaming a file.#7209zaggino merged 1 commit intoadobe:masterfrom Robo210:initial_selection
Conversation
This change performs the rename as usual through JSTree, then grabs the DOM node and adjusts the selection on it after the fact. This fixes issue #7019
|
Initial review done, works & looks fine. |
|
@zaggino could you please finish this review and when you are done please merge. Thanks. |
There was a problem hiding this comment.
Should it be first index of "." instead? If I have e.g. "foo.css.erb" I'd just want to rename the "foo" part.
There was a problem hiding this comment.
When renaming files like less-1.4.2.min.js, usually only the last part is considered an extension.
|
Ignore comment, good to merge. My blind self. |
Exclude file ext from initial selection when renaming a file.
|
@peterflynn - this could be done as a separate PR because it's a bit more complicated. Should we search the |
|
Seems plausible, but I don't know if we have to get that fancy. Your argument above sounded reasonable enough to me -- let's wait & see if we get any feedback about it? |
|
Hi, |
|
I don't know - I realized I like the fancy idea and also implementation was just a few lines so I made up a PR and I'll leave to others to merge or not to merge :) |
|
Btw @peterflynn we do not longer use doublequotes |
|
@zaggino Ah, yes -- all JS code should use double-quoted strings (per style guide). So the string in the |
|
Already did that for PR. Also tried using |
|
Seems worth fixing the ones in src at least, though not high priority... |
This change performs the rename as usual through JSTree, then
grabs the DOM node and adjusts the selection on it after the fact.
This fixes issue #7019