Home Download Buy Blog Forum Support

Funny search/select behavior

Funny search/select behavior

Postby highfructose on Wed Nov 28, 2012 12:58 am

I'm not sure how to better describe this in a short summary, but it's been nagging at me for a long while now. Maybe there's some intended behavior I'm not understanding here, but to me it seems like inconsistent behavior: After searching for some text, doubleclicking a 'highlighted' instance in the document appears to select the word, but the focus still remains in the Search box, which seems counter-intuitive. Best explained with some simple repro steps:

1. create new document with text: "zoo zoom boom"
2. open Find pane, type "zoo"
3. See that editor highlights "zoo" (indicating the "active" result) and outlines the "zoo" portion of "zoom". Hitting enter in Find dialog toggles between these two, as expected.
4. Doubleclick outlined instance of "zoo", note that the cursor moves to the end of the word and the word is selected - typing anything now will replace this text entirely. This seems like fairly universal behavior in text editors.
5. De-select text, enter Find pane again, re-type "zoo", see same behavior as in #3.
6. Doubleclick highlighted instance of "zoo". Note that the word is selected but in a way that's visually differently than in #4. The cursor is also still in the Find pane. Typing anything now appends new text to the end of the text in the Find pane. This seems contrary to the behavior in #4 above, and counter to behavior in other editors.

Is there something that doublelclicking the "active" result from a find query is supposed to do, rather than enter Edit mode? I find this behavior frustrating - often I'll search a document that contains multiple instances of a word, hit Enter a few times to move along to the one I'm interested in changing, double click it, type something and end up having the selected instance move on to another word entirely, because I'm changing the Find content instead of the thing I just doubleclicked. Which results in my having to undo the change to the Find pane, then re-find the instance I was looking for originally. The only way I'm able to edit the text is to either explicitly exit the Find pane, or select some text next to the instance, then double click it, which performs behavior as in #4 above.

I just don't understand why doubleclicking non "active result" text shifts cursor focus back to the Editor, while doubeclicking an "active result" from a Find query doesn't shift the cursor back. Can someone explain if there's a way around this, or am I just missing some sort of neat functionality that's not apparent?
Posts: 1
Joined: Wed Nov 28, 2012 12:44 am

Re: Funny search/select behavior

Postby qgates on Thu Nov 29, 2012 4:13 pm

You've stumbled upon some oddities in Sublime's workflow paths. Some of these need tidying up imo. Basically The "find" highlight is the normal selection which is further highlighted to bring your attention to that instance. At this point if you hit Escape you'll see that "found" item selected normally, with the cursor placed at the selection's end, the Find pane closed and the focus back on your text.

So far as I'm aware there's no key to focus back on the doc while leaving the find pane open and the current found item selected. Escape gets you there but closes the find pane.

This stuff doesn't bother me much because once you've typed something into the find pane you can lose it altogether with Escape and use F3/Shift+F3 to repeat the search down and up anyway. Even nicer is the "slurp" function (Ctrl+e in windows/linux) which allows you to select some text and slurp it into the find buffer. These days I don't use the find pane much :)

Part of these confusions come from Sublime's lack of modality (arguably a good thing) and part of it comes from inconsistency or lack of features (not so good). Hopefully Jon's got some good stuff on the way!

Posts: 231
Joined: Mon Nov 05, 2012 4:33 pm

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 16 guests