Skip to content

feat(navigation): jump to file at cursor in output window#395

Merged
sudo-tee merged 1 commit into
sudo-tee:mainfrom
phanen:feat/jump-to-file
Jun 1, 2026
Merged

feat(navigation): jump to file at cursor in output window#395
sudo-tee merged 1 commit into
sudo-tee:mainfrom
phanen:feat/jump-to-file

Conversation

@phanen
Copy link
Copy Markdown
Contributor

@phanen phanen commented Jun 1, 2026

resolve_file_at_cursor parses markdown links, file:// URIs, action
lines, and diff hunks. jump_to_file_at_cursor opens the file in
state.last_code_win_before_opencode (winnr('#') fallback) using a
silent :buffer/:edit helper to avoid re-triggering autocmds.

Copy link
Copy Markdown
Owner

@sudo-tee sudo-tee left a comment

Choose a reason for hiding this comment

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

I really like this idea.

Thanks for the PR.

I left a little comment about the jump function which I find a little complex.

Once the comment addressed it should be good to go

Comment thread lua/opencode/ui/navigation.lua
@jensenojs
Copy link
Copy Markdown
Contributor

I also have a PR related to this feature, but it's somewhat similar to the one about automatically jumping to sub-sessions. It doesn't seem to have much to do with the code changes in the current PR. I might be quite busy these days, but I may continue to add related features based on this in the future ?

@phanen phanen force-pushed the feat/jump-to-file branch from 044b915 to 58ad1b9 Compare June 1, 2026 12:44
resolve_file_at_cursor parses markdown links, file:// URIs, action
lines, and diff hunks. jump_to_file_at_cursor opens the file in
state.last_code_win_before_opencode (winnr('#') fallback) using a
silent :buffer/:edit helper to avoid re-triggering autocmds.
@phanen phanen force-pushed the feat/jump-to-file branch from 58ad1b9 to 66cdd0c Compare June 1, 2026 12:50
@sudo-tee sudo-tee merged commit 0baa2e8 into sudo-tee:main Jun 1, 2026
5 checks passed
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.

3 participants