Skip to content

feat(ui): show hovered URL in the status bar#79

Merged
roramirez merged 1 commit into
mainfrom
feat/url-preview-statusbar
Jul 18, 2026
Merged

feat(ui): show hovered URL in the status bar#79
roramirez merged 1 commit into
mainfrom
feat/url-preview-statusbar

Conversation

@roramirez

Copy link
Copy Markdown
Owner

Summary

When the mouse hovers a linked cell (OSC 8 hyperlink or auto-detected URL), the full URL is now shown in the status bar. Previously hovered_url only underlined the cell; it was never surfaced as text.

Changes

  • Renderer::draw takes a new hovered_url: Option<&str> argument, forwarded into draw_status_bar.
  • render_ops.rs passes self.state.hovered_url.as_deref() on every frame.
  • In the status bar the hovered URL takes the center slot in place of the pane title (hovered_url.or(pane_title)); it is suppressed during Search mode just like the pane title.
  • draw_pane_title_centered now truncates over-long center text with a middle ellipsis via a new truncate_middle_ellipsis helper, keeping the URL scheme/host and path tail visible.
  • Added a renderer test covering the short and over-long (truncation) URL paths; updated all existing draw call sites to pass the new argument.
  • CHANGELOG and README updated.

How to test

  • cargo test (1218 pass, includes new draw_status_bar_hovered_url_does_not_panic).
  • cargo clippy --locked -- -D warnings (clean).
  • Manually: run mmterm, printf '\e]8;;https://example.com/some/long/path\e\\link\e]8;;\e\\\n', hover the rendered link, and observe the URL centered in the status bar (truncated with an ellipsis when very long).

When the mouse hovers a linked cell (OSC 8 hyperlink or auto-detected
URL), render the full URL in the center slot of the status bar, in place
of the pane title. Over-long URLs are shortened with a middle ellipsis
so both the scheme/host and the path tail stay visible.
@roramirez
roramirez merged commit 55aa882 into main Jul 18, 2026
2 checks passed
@roramirez
roramirez deleted the feat/url-preview-statusbar branch July 18, 2026 21:07
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.

1 participant