Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not automaticall populate search box with selected text #71404

Closed
fredlcore opened this issue Mar 28, 2019 · 7 comments
Closed

Do not automaticall populate search box with selected text #71404

fredlcore opened this issue Mar 28, 2019 · 7 comments
Assignees
Labels
editor-find Editor find operations feature-request Request for new features or functionality

Comments

@fredlcore
Copy link

When searching for text in an open editor, the search box is automatically populated with any currently selected text. While this is fine when first starting a search, it is a pain when I search for a given text, then make some changes and then want to search for the next occurrence. In that case, the word next to the cursor is automatically selected and overwrites the previous search term.

I know I can jump back to the previous search term with Alt+arrow up (on Mac), but it's an additional and annoying step which I would like to avoid.

@vscodebot
Copy link

vscodebot bot commented Mar 28, 2019

@vscodebot vscodebot bot added the search Search widget and operation issues label Mar 28, 2019
@roblourens roblourens added the feature-request Request for new features or functionality label Mar 29, 2019
@roblourens
Copy link
Member

I recommend using the F3 or F4 keys to navigate to the next search. I don't think it's worth adding a whole setting to disable this.

@roblourens roblourens added the *out-of-scope Posted issue is not in scope of VS Code label Oct 9, 2019
@fredlcore
Copy link
Author

I'm not sure if we are talking about the same issue. F3 (on Mac) jumps to the next occurrence of the search string. F4 has no effect (on Mac).

What I mean is something different:
I search for a string with CMD+F (on Mac) and go through the hits (for example with F3). When I have found the hit that I want to edit and make some changes and then want to search for the next hit with CMD+F, the old search string is replaced with the word next to the cursor.
And yes, as I mentioned above, I can use ALT+Arrow Up (on Mac) to go back by one in the search string "history", but this is a pain in the back if you want to make changes on various locations using the same search string.

So maybe you could reconsider closing this issue?

Thanks,

F.

@roblourens roblourens reopened this Oct 10, 2019
@roblourens roblourens assigned rebornix and unassigned roblourens Oct 10, 2019
@roblourens roblourens added editor-find Editor find operations and removed *out-of-scope Posted issue is not in scope of VS Code search Search widget and operation issues labels Oct 10, 2019
@roblourens
Copy link
Member

and then want to search for the next hit with CMD+F

I'm saying, you can use F3 to go to the hit instead of cmd+F then enter, but maybe I'm still misunderstanding

@fredlcore
Copy link
Author

No, that is true, I didn't know about this, thanks a lot, I just have to re-wire my mind a bit to switch between CMD+F and F3 because most other editors do not have the behaviour and keep the original search string, but I agree that adding a config option is then probably too much of an effort, so you can close this issue then.

@roblourens
Copy link
Member

Actually I think this issue is the right dupe: #20768

Also there is apparently already a setting to disable this entirely: editor.find.seedSearchStringFromSelection

@fredlcore
Copy link
Author

Yes, that is the correct dupe, and also a perfectly fine solution to my issue, thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-find Editor find operations feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants