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

Unexpected use of find clipboard on focus #39693

Closed
alexdima opened this issue Dec 5, 2017 · 6 comments
Closed

Unexpected use of find clipboard on focus #39693

alexdima opened this issue Dec 5, 2017 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-find Editor find operations

Comments

@alexdima
Copy link
Member

alexdima commented Dec 5, 2017

Testing #39585

MacOS find clipboard gets activated when focusing the find widget.

  • search in another program for "hello"
  • open a file , go to an empty line or something
  • press cmd+f3
  • the find widget pops up empty
  • click inside the find widget
  • the search string gets populated with "hello" unexpectedly.
@alexdima alexdima added the editor-find Editor find operations label Dec 5, 2017
@wprater
Copy link
Contributor

wprater commented Dec 5, 2017

I'm curious why this is being filed as a bug? this is how I'd expect it to behave.

#39585 (comment)

@wprater
Copy link
Contributor

wprater commented Dec 5, 2017

as per #39609 all find inputs should be automatically populated with the global search buffer.

for example, if Im to be in one workspace and cmd+e over highlighted text (places into global search buffer), Id expect to see this string in all my cocoa apps search input fields (Terminal, Safari, Chrome, etc.)

currently when I cmd+e to place in buffer in one workspace and then head to another to perform a find all, the input in the find all is not populated with the global search buffer as it should be.

@rebornix
Copy link
Member

rebornix commented Dec 6, 2017

@wprater thanks for your feedback. I dropped my thoughts in #39422 (comment) , the global find clipboard works the same as you described. But for this command Find Next Selection, we may want to save the selection to global find clipboard as it's what the command asks for.

@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Dec 6, 2017
@melvin0008
Copy link
Contributor

melvin0008 commented Dec 6, 2017

@rebornix we are currently saving the selection to the global find clipboard.

You may try this by selecting a text using Cmd+E and then switching the application and using Cmd + G to find in that application.

@alexdima
Copy link
Member Author

alexdima commented Dec 6, 2017

I don't expect the search string to change on focus gain via mouse click. I have not seen any application that changes the search text on focus gain via mouse click on OSX or any other OS.

Here I do the steps I describe:

  • search for "hello" in Chrome
  • open VSCode
  • press cmd+f3
  • click in the search input
  • it is unexpected that "hello" appears when clicking in there.

kapture 2017-12-06 at 11 31 06

@rebornix
Copy link
Member

rebornix commented Dec 7, 2017

@alexandrudima thanks, you are right. It should not be triggered by clicking. If editor.find.globalFindClipboard: true and the clipboard service is available (macOS), we read from the global find clipboard only when

  • The cursor is not on a word and there is no selection, then users run Find (Cmd+F)
  • Users run Find Next (Cmd+G, F3)
  • Users switch from another application back to VSCode and the Find Widget is visible at the same time

Others work the same way as before.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-find Editor find operations
Projects
None yet
Development

No branches or pull requests

4 participants