Skip to content

feat: add jump action#73

Open
idan-at wants to merge 4 commits intoaxieax:mainfrom
idan-at:main
Open

feat: add jump action#73
idan-at wants to merge 4 commits intoaxieax:mainfrom
idan-at:main

Conversation

@idan-at
Copy link
Copy Markdown

@idan-at idan-at commented Jan 27, 2026

Allows moving the cursor to the URL location when selected through the picker

Fixes #72

Allows moving the cursor to the URL location when selected through the picker
Copy link
Copy Markdown
Owner

@axieax axieax left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @idan-at! Since the picker shows unique links, I think the jump action should populate the jumplist with all instances of the url for easy navigation.

In that case I think we can simplify the code to use string.find to scan the entire buffer for the url_without_prefix, and work backwards to use the start of the word in case the match is to the middle of a URL, i.e. (buffer with https://www.google.com and www.google.com should set the jumplist to the beginning of both URLs).

Copy link
Copy Markdown
Owner

@axieax axieax left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes @idan-at! Actually, I just had a closer think about the expected behaviour for the jump action, and I think populating the jumplist doesn't make any sense (not the intended purpose for navigating between urls). Sorry but let's revert the changes to the commit before, and clarify in the docs that the expected behaviour is to navigate to the first instance in the buffer.

Comment thread lua/urlview/actions.lua Outdated
Comment thread lua/urlview/actions.lua Outdated
Comment thread lua/urlview/actions.lua Outdated
Comment thread lua/urlview/actions.lua
@idan-at
Copy link
Copy Markdown
Author

idan-at commented Feb 16, 2026

Hey, took me a while but finally got to it :)

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.

Add default_action=jump

2 participants