Skip to content

enhance(issue): add "r" shortcut to quote selected text in a reply - #39232

Open
rspeicher wants to merge 1 commit into
go-gitea:mainfrom
rspeicher:cc-issue-quote-reply-hotkey
Open

enhance(issue): add "r" shortcut to quote selected text in a reply#39232
rspeicher wants to merge 1 commit into
go-gitea:mainfrom
rspeicher:cc-issue-quote-reply-hotkey

Conversation

@rspeicher

@rspeicher rspeicher commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Selecting text in an issue, pull request, or code review comment and pressing r quotes it into the reply editor — the same result as Quote Reply in the context menu, which already quotes a selection when one exists. With no selection, or one spanning two comments, the key does nothing.

Refs #5796

Not built on the <kbd>/data-shortcut-keys module from #36416, which focuses an input rather than running an action. Happy to generalize that instead.

No visual change; a <kbd>R</kbd> hint on the menu item could be added if wanted.

Two reviewer calls:

  • quote-reply-diff is now unused: both entry points resolve .comment-code-cloud structurally. Removing it touches five templates, left as a follow-up.
  • Pre-existing, inherited here: programmatic editor.value() does not fire EventEditorContentChanged, so the Comment button stays disabled until the user types.

Written by Claude Opus 5 (Claude Code).

Selecting text in an issue, pull request or code review comment and pressing "r" now quotes it into the reply
editor, the same result as picking Quote Reply from the comment's context menu. With no text selected, or with a
selection spanning more than one comment, the key does nothing so it stays out of the way of normal typing.

The context menu identified its comment through the clicked item's data-target, which a keystroke does not have,
so the comment is resolved from the selection instead and both entry points share the editor lookup.

Assisted-by: Claude Code:claude-opus-5[1m]
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 3, 2026
@github-actions github-actions Bot added topic/issues type/enhancement An improvement of existing functionality labels Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/issues type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants