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 /dw/selection.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 'dw/selection.cc')
-rw-r--r-- | dw/selection.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dw/selection.cc b/dw/selection.cc index 899fad69..78cd23ce 100644 --- a/dw/selection.cc +++ b/dw/selection.cc @@ -198,7 +198,7 @@ bool SelectionState::buttonRelease (Iterator *it, int charPos, int linkNo, // nothing selected resetSelection (); else { - copy (); + copy (0); selectionState = SELECTED; } } @@ -423,7 +423,7 @@ void SelectionState::highlight0 (bool fl, DeepIterator *from, int fromChar, } } -void SelectionState::copy() +void SelectionState::copy(int selection) { if (from && to) { Iterator *si; @@ -495,7 +495,7 @@ void SelectionState::copy() delete i; } - layout->copySelection(strbuf.getChars(), 0); + layout->copySelection(strbuf.getChars(), selection); } } |