diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-05-07 23:54:32 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-05-08 00:00:32 +0200 |
commit | d901d8b641c88f9f22b0479d4b3326b2ed06e958 (patch) | |
tree | 5e43ce0b923368457215651b2a1eb68921e275a2 /src/uicmd.cc | |
parent | 1e5da933a4ef2c5de8ca711215918e9f3ff9df3e (diff) |
Make Ctrl+C copy selection into clipboard
Follows the behavior of so many other programs by copying the current
text selection into the clipboard with Ctrl+C. Selecting text continues
to copy it into the primary selection.
Fixes: https://github.com/dillo-browser/dillo/issues/228
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r-- | src/uicmd.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc index a2c21311..a46fd7c5 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -953,6 +953,16 @@ void a_UIcmd_redirection0(void *vbw, const DilloUrl *url) } /* + * Copy selection to clipboard + */ +void a_UIcmd_copy(void *vbw) +{ + BrowserWindow *bw = (BrowserWindow*) vbw; + Layout *layout = (Layout*)bw->render_layout; + layout->copyCurrentSelection(1); +} + +/* * Zoom in */ void a_UIcmd_zoom_in(void *vbw) |