Open core-ai-bot opened 2 years ago
Comment by petetnt
Friday Oct 30, 2015 at 07:57 GMT
Should the lastQueriedText
persist over Find In Files only or during all the findbar events? (Normal CTRL+F, Search and Replace, Replace in Files...). Consider something like following:
a) "Hot dogs" (persisting searches) b) Nothing? (the current default behavior (without Find in Files/Instant search))
I would be partial for all searches persisting (a))
There's another variation of the previous where it's even more mixed up:
:+1: for this feature/fix otherwise
Comment by abose
Tuesday Nov 03, 2015 at 13:08 GMT
Thanks@
petetnt for reviewing.
I have modified this to save last typed text irrespective of success of last executed query.
Comment by petetnt
Tuesday Nov 03, 2015 at 16:51 GMT
Tested against https://github.com/adobe/brackets/commit/30716f4d765b87617cfc28cf1d0cae4106f0c3ef again and it fixes everything I mentioned in https://github.com/adobe/brackets/pull/11869#issuecomment-152453483 :+1: LGTM as it is.
Here's some food for though: should it remember the position of your search too? Consider something:
bar
foo 1
foo 2
bar
foo 3
foo 4
Search for foo
, cycle to the third foo
and focus the editor on the bar
-> Find-bar closes. Reopen Find bar. Is the expected highlighted one the closest one (the current implementation) or the 3rd one, the one you were in when you focused the editor. I think the latter would make more sense in most cases when the last searched phrase persists too.
Comment by abose
Thursday Nov 05, 2015 at 09:37 GMT
I prefer the current implementation, the search progressing closest to the current cursor. That might be individual preference.
Comment by rroshan1
Thursday Nov 05, 2015 at 10:06 GMT
I have verified the changes. Looks good to me. Point to Note:- On reopening the "Find in Files" bar, any active selection would be given preference over the last remembered search. :+1: Merging the PR.
fix: instant search doesn't work after ctrl+v on textfield Remember last searched phrase #11735
abose included the following code: https://github.com/adobe/brackets/pull/11869/commits