GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Search editor go to location improvements by ssigwart · Pull Request #135227 · microsoft/vscode

Conversation

@ssigwart

@ssigwart Stephen Sigwart (ssigwart) commented Oct 17, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Added option to go to and select the match
  • Fixed cursor placement with initial whitespace
  • Also fixes separator typo

This PR fixes #135226.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ssigwart
Search editor go to location improvements
657964d
- Added option to go to and select the match
- Fixed cursor placement with initial whitespace
@vscode-triage-bot VS Code Issue Triage Bot (vscode-triage-bot) assigned Jackson Kearl (JacksonKearl) Oct 17, 2021
@JacksonKearl Jackson Kearl (JacksonKearl) added this to the October 2021 milestone Oct 18, 2021
@ssigwart Stephen Sigwart (ssigwart) mentioned this pull request Oct 19, 2021
Search editor opened results cursor placement is wrong with indentation #135226
Closed
@JacksonKearl

Jackson Kearl (JacksonKearl) commented Oct 23, 2021

Copy link
Copy Markdown
Contributor

Thanks for creating this! Could you please split out the selection patch so that this PR impacts only search editor code?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JacksonKearl
Jackson Kearl (JacksonKearl) self-requested a review October 23, 2021 01:01
@ssigwart

Stephen Sigwart (ssigwart) commented Oct 23, 2021

Copy link
Copy Markdown
Contributor Author

Jackson Kearl (@JacksonKearl), thanks for looking. Which part do you want me to split out? I assume you mean to only keep the code to fix one of the two issues in this branch, but I'm not sure which one you want kept in here and which to open a new PR for.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JacksonKearl

Jackson Kearl (JacksonKearl) commented Oct 25, 2021

Copy link
Copy Markdown
Contributor

This PR should only have the code changes needed for #135226. I would try to avoid changing src/vs/editor/contrib/gotoSymbol/goToCommands.ts for #128927.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ssigwart
Remove microsoft#128927 changes
d94b475
@ssigwart

Stephen Sigwart (ssigwart) commented Oct 26, 2021

Copy link
Copy Markdown
Contributor Author

Thanks, Jackson Kearl (@JacksonKearl)! I update it. A far as I can tell, I cannot accomplish #128927 with an extension. If I create a new pull request for that, do you think it could be merged?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

JacksonKearl
Jackson Kearl (JacksonKearl) suggested changes Oct 26, 2021
View reviewed changes
Comment thread extensions/search-result/src/extension.ts Outdated

const FILE_LINE_REGEX = /^(\S.*):$/;
const RESULT_LINE_REGEX = /^(\s+)(\d+)(:| )(\s+)(.*)$/;
const RESULT_LINE_REGEX = /^(\s+)(\d+)(: | )(\s*)(.*)$/;

@JacksonKearl Jackson Kearl (JacksonKearl) Oct 26, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The separator should always be length two, yes? So two spaces on the alternate side:

/^(\s+)(\d+)(: |  )(\s*)(.*)$/;

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Jackson Kearl
Fix up seprartor logic
cb57abb
@JacksonKearl

Jackson Kearl (JacksonKearl) commented Oct 26, 2021

Copy link
Copy Markdown
Contributor

Pushed a change to fix an off-by-one on context lines, besides that looks good. Thanks for this!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JacksonKearl
Jackson Kearl (JacksonKearl) merged commit dbea36b into microsoft:main Oct 26, 2021
@JacksonKearl

Jackson Kearl (JacksonKearl) commented Oct 26, 2021

Copy link
Copy Markdown
Contributor

As for #128927, IMO handling untyped args in the goTo provider for this narrow use case is a bit odd, but I also don't know a better way. The search result editor is a bit of a patchwork of existing editor features, to change the underlying constructs too much for the narrow use case of the search editor doesn't feel great.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ssigwart
Stephen Sigwart (ssigwart) deleted the goToSearch branch October 27, 2021 02:02
@ssigwart

Stephen Sigwart (ssigwart) commented Oct 27, 2021

Copy link
Copy Markdown
Contributor Author

Thanks. I was thinking if I could get decorations (#48364) I could write an extension to do this instead, but that's not supported. What if I implement it without the args? I haven't checked yet, but I'm wondering if after calling executeCommand for editor.action.goToDeclaration, I can just set the selection on the new editor.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JacksonKearl

Jackson Kearl (JacksonKearl) commented Oct 27, 2021

Copy link
Copy Markdown
Contributor

If you can implement it with changes localized to search editor files I would consider it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ssigwart

Stephen Sigwart (ssigwart) commented Oct 28, 2021

Copy link
Copy Markdown
Contributor Author

Great. Thank you, Jackson Kearl (@JacksonKearl). I found a way to do that in #136002.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot locked and limited conversation to collaborators Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@JacksonKearl Jackson Kearl (JacksonKearl) JacksonKearl requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@JacksonKearl Jackson Kearl (JacksonKearl)

Labels

None yet

Projects

None yet

Milestone

October 2021

Development

Successfully merging this pull request may close these issues.

Search editor opened results cursor placement is wrong with indentation

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ssigwart @JacksonKearl
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.