diff --git a/CHANGELOG.md b/CHANGELOG.md index f231a1be..1cd4a325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,6 +83,8 @@ - paper-color - selenized - solarized +* `regex-copy`/`show-urls-copy` will copy and paste the selected text if the hint + is completed with an uppercase character. [2025]: https://codeberg.org/dnkl/foot/issues/2025 diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 215809f8..4a14884c 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -1348,7 +1348,8 @@ e.g. *search-start=none*. *show-urls-launch* Enter URL mode, where all currently visible URLs are tagged with a jump label with a key sequence that will open the URL (and exit - URL mode). Default: _Control+Shift+o_. + URL mode). If the hint is completed with an uppercase character, + the match will also be pasted. Default: _Control+Shift+o_. *show-urls-persistent* Similar to *show-urls-launch*, but does not automatically exit URL @@ -1380,8 +1381,10 @@ e.g. *search-start=none*. Default: _none_. *regex-copy* - Same as *regex-copy*, but the match is placed in the clipboard, - instead of "launched", upon activation. Default: _none_. + Same as *regex-launch*, but the match is placed in the clipboard, + instead of "launched", upon activation. If the hint is completed + with an uppercase character, the match will also be pasted. + Default: _none_. *prompt-prev* Jump to the previous, currently not visible, prompt (requires diff --git a/url-mode.c b/url-mode.c index 828adf22..19193b64 100644 --- a/url-mode.c +++ b/url-mode.c @@ -278,7 +278,7 @@ urls_input(struct seat *seat, struct terminal *term, switch (match->action) { case URL_ACTION_COPY: // If the last hint character was uppercase, copy and paste - if (wc >= 'A' && wc <= 'Z') { + if (wc == toc32upper(wc)) { if (term->bracketed_paste) term_to_slave(term, "\033[200~", 6);