Repository navigation
feat(text): El::link_cursor, the pointer's shape over a selectable text's links - #2121
Merged
Merged
Conversation
CSS help and progress: the arrow with a question mark and the arrow with a busy mark. winit has both (IDC_HELP and IDC_APPSTARTING on Windows, the theme's cursors on Linux, the CSS cursors on the web); on macOS the private AppKit selectors winit uses, behind respondsToSelector, else the arrow.
…or it shows A top-level pointer object (at, cursor) and a cursor field on the one element the shape is read from, by CSS name. Runtime::cursor's choice of that element moves into cursor_origin, which cursor_path shares.
…xt's links The hand over a link in selectable text was fixed in Runtime::cursor, ahead of anything the element set, and El::selectable takes the element's cursor for the I-beam. link_cursor names another shape; the hand stays the default.
This was referenced Nov 25, 2026
… its own; link_cursor names the shape there too
… no cursor of its own
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Compiled
Compiled on Windows x64, Windows arm64, macOS and Linux x64 in anomalyco/opencode-rune#1137, all four build jobs green: the app with Rune pinned to a check commit, the rev the app pins today (
4d8df909) plus this change and the five other cursor changes, cherry-picked. That is this change on the app's rev, not on this branch's base (devis 117 commits past it); everymatchonCursorthatdevhas was checked by reading.Not covered by that compile:
devchanged the same condition while this was open (the hand now also shows over a link in text that sets no cursor of its own), so the merge ofdevinto this branch rewrote one expression inRuntime::cursorby hand.link_cursornames the shape in that case too.Why
Over a link in selectable text the pointer always shows the hand. An app could not change it:
Runtime::cursorreturns the hand for a link in selectable text before it looks at any element's cursor.El::selectabletakes the element's own cursor for the I-beam, soEl::cursorcannot carry "the arrow over my links" either.A web page can:
a { cursor: default }gives a link that reads as plain text the arrow while the text around it keeps the I-beam. An app that matches such a page element by element showed a hand where the page shows the arrow (a URL in a tool's output, for one).What changes
El::link_cursor(Cursor): the pointer's shape over this text's links while the text is selectable.What it can change for an app
Nothing until an app calls it:
Not run
The new test has not been run: this repo's tests run on the scheduled macOS job, which I read after the merge.
a_selectable_texts_link_shows_the_hand_unless_link_cursor_names_another_shapecovers the default, the override, and the I-beam beside the link in both.