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

cmd+E (action.findWithSelection) does not work with multiple line selections #47400

Closed
andyperlitch-turnto opened this issue Apr 7, 2018 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-find Editor find operations verified Verification succeeded
Milestone

Comments

@andyperlitch-turnto
Copy link

  • VSCode Version: 1.22.1
  • OS Version: macOS 10.12.6

Steps to Reproduce:

  1. Make a selection with a line break in it
  2. Press cmd+e to invoke action.findWithSelection
  3. Rather than fill the find field with text, it just puts focus on that field with whatever value was there before. **Note that when the selection does NOT span across a line break, cmd+e/action.findWithSelection works as expected.

Does this issue occur when all extensions are disabled?: Yes

thing

@vscodebot vscodebot bot added editor editor-find Editor find operations labels Apr 7, 2018
@rebornix rebornix added the under-discussion Issue is under discussion for relevance, priority, approach label May 4, 2018
@rebornix
Copy link
Member

IMO the problem here is we don't have a plain text multiline search support (other than regex) in the Find Widget, let's track it in #15727 .

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 5, 2018
@rebornix rebornix reopened this Oct 8, 2020
@rebornix rebornix added this to the October 2020 milestone Oct 8, 2020
@rebornix rebornix added bug Issue identified by VS Code Team member as probable bug and removed under-discussion Issue is under discussion for relevance, priority, approach labels Oct 8, 2020
@rebornix rebornix changed the title cmd+E (action.findWithSelection) does not work when selection has line breaks cmd+E (action.findWithSelection) does not work with multiple line selections Oct 8, 2020
@rebornix
Copy link
Member

Verifier:

Firstly, test the existing behavior of cmd+f is not regressed. Create a text file with following text

const a = 0;

if (true) {
	const a = 0;	
}
  • Make sure you have setting "editor.find.autoFindInSelection": "never"
  • Move cursor to Line 1 Column 2, cmd+f should open the find widget, and the input is const
  • Change setting "editor.find.autoFindInSelection": "multiline"
  • Select all text in the document, cmd+f should have Auto Find In Selection turned on, and the input is still const
  • Dismiss the find widget, run cmd+e, the find widget should be the same as before
  • Change setting "editor.find.autoFindInSelection": "never"
  • Select text of the first two lines
  • cmd+e should open the find widget and the input is the text of the first two lines.

@jrieken jrieken added the verified Verification succeeded label Oct 29, 2020
@rebornix rebornix modified the milestones: October 2020, November 2020 Oct 30, 2020
@rebornix rebornix removed insiders-released Patch has been released in VS Code Insiders verified Verification succeeded labels Oct 30, 2020
@rebornix rebornix reopened this Oct 30, 2020
@rebornix
Copy link
Member

The fix went in pretty late in this iteration, even though it fixes this issue, it leads to #109756 and it's not trivial to make it all correct. So I'll revert my fixes and look deep into this next iteration.

@rzhao271 rzhao271 removed the insiders-released Patch has been released in VS Code Insiders label Nov 2, 2020
@rebornix rebornix reopened this Nov 2, 2020
@rebornix
Copy link
Member

rebornix commented Nov 2, 2020

Fixed via 6acc9ff with unit tests.

@rebornix rebornix closed this as completed Nov 2, 2020
@roblourens roblourens added the verified Verification succeeded label Dec 3, 2020
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 verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants
@roblourens @rebornix @jrieken @alexdima @rzhao271 @andyperlitch-turnto and others