Skip to content

Fix open and switch command behaviour #193

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

Closed

Conversation

GloriousPtr
Copy link
Contributor

@GloriousPtr GloriousPtr commented Apr 13, 2024

  • Open command now uses Switch command- Switches to file if already opened; if not, opens the file.
  • Improve switch command to search for the candidate entity in all panels, not just the selected panel, also focus on the panel when found.

Both improvements are a real time saver when using these commands with ipc.

@GloriousPtr GloriousPtr changed the title Fix open switch commands Fix open and switch command behaviour Apr 13, 2024
@GloriousPtr GloriousPtr force-pushed the fix-open-switch-commands branch 2 times, most recently from c94dfa1 to 83d30ee Compare April 13, 2024 02:34
- Open command uses Switch command- Switches to file if already opened; if not, opens the file.
- Improve switch command to search for the candidate entity in all panels, not just the selected panel, also focus on the panel when found.

Both improvements are a real time saver when using these commands with ipc.
@GloriousPtr GloriousPtr force-pushed the fix-open-switch-commands branch from 83d30ee to c46ca8e Compare April 13, 2024 02:42
@GloriousPtr GloriousPtr changed the base branch from master to dev April 16, 2024 02:11
@ryanfleury
Copy link
Collaborator

This has been cleaned up in post-0.9.17 as of 2c58b81. When driving the debugger via IPC, you'll almost certainly want to use find_code_location rather than open; that is the same path which is used when snapping to source locations when a thread stops, for example, so it doesn't duplicate tabs and so on. I'd like to keep the open path the way it is, generating new tabs, since it's a slightly distinct mechanism that you sometimes want in some cases. I've adjusted switch to look for the file in all tabs, and to focus the panel with the tab when it finds it.

@ryanfleury ryanfleury closed this May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants