You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Highlight to copy to clipboard feature is inconsistent #125
Rune copies highlighted text to system clipboard, but it doesn't copy highlighted text from files opened in (modal) editors to system clipboard. This is undocumented behaviour.
Also, there have been a few occasions where clicking on the Rune window to focus it copies a single character to the system clipboard, wiping out any previously copied text.
I understand I can turn off this feature with clipboard: "memory", however, setting that disables the highlight-to-copy feature.
What you expected
A consistent featureset: Either highlighting text does not copy to both the system and memory clipboards, or highlighting text also copies to memory clipboard.
Steps to reproduce
Launch Rune
Open terminal, highlight text. There is this choppiness to selecting and dragging the text. Clicking repeatedly copies single letters, words, or lines. Press to paste it
Change Rune config to clipboard: "memory"
Open terminal, highlight text, to try to paste it, doesn't work
(to demonstrate copy pasting still works) Highlight text, there is no more of the aforementioned choppiness to highlighting text. Press to copy it and to paste it, it works
In other terminal emulators, opening Vim and highlighting text in there uses the mouse capabilities of Vim (you can see it switch from INSERT to VISUAL mode), whereas holding down Shift and highlighting text uses the terminal emulator's mouse capabilities.
In Rune, there is no distinction: the mouse input gets passed to both the terminal emulator and Vim.
Another feature to consider implementing, on top of the clipboard behaviour to be addressed in this issue, is that even when clipboard: "memory", Shift+Highlight and <meta+c> copies text to the system clipboard.
There have been a few occasions where clicking on the Rune window to focus it copies a single character to the system clipboard, wiping out any previously copied text.
So in gnome-terminal, click and drag only highlights a cell when the mouse moves horizontally by 1 cell, whereas in Rune the slightest movement (vertical or horizontal) highlights a cell. Fixing this would resolve the above quoted part of this issue.
In Rune's vim editor, simply clicking (taking care not to move the mouse) on a letter highlights it, and you can see the highlight when you scroll - the highlight stays at the letter where you clicked, while vim's cursor moves along with the scroll. The previous fix would resolve this too.
Thanks, that was the missing piece. The mouse SDK calls SetSelectionEnd on every held-button event, even while the pointer is still inside the pressed cell, so a slight wobble during a click highlighted one character and copied it. The vim case comes from the same path: vim receives the click, but the drag events after it were still painting a terminal highlight, and that is the highlight you saw stay put while vim scrolled.
I reworked #126 around this instead of removing highlight-to-copy. A highlight now starts only once the drag leaves the pressed cell, and when the running program tracks the mouse, clicks and drags go to it alone. Real drags, double-click and triple-click still copy. Shift+drag to override mouse tracking is a good idea, but the SDK currently ignores modified mouse events, so I left it out of this PR.
If you get a chance to try the branch on Wayland, I'd like to know whether the focus-click problem is gone for you.
Activity
zhengqunkoo commentedon Sep 22, 2026
In other terminal emulators, opening Vim and highlighting text in there uses the mouse capabilities of Vim (you can see it switch from INSERT to VISUAL mode), whereas holding down Shift and highlighting text uses the terminal emulator's mouse capabilities.
In Rune, there is no distinction: the mouse input gets passed to both the terminal emulator and Vim.
Another feature to consider implementing, on top of the clipboard behaviour to be addressed in this issue, is that even when
clipboard: "memory", Shift+Highlight and <meta+c> copies text to the system clipboard.zhengqunkoo commentedon Sep 23, 2026
So in gnome-terminal, click and drag only highlights a cell when the mouse moves horizontally by 1 cell, whereas in Rune the slightest movement (vertical or horizontal) highlights a cell. Fixing this would resolve the above quoted part of this issue.
In Rune's vim editor, simply clicking (taking care not to move the mouse) on a letter highlights it, and you can see the highlight when you scroll - the highlight stays at the letter where you clicked, while vim's cursor moves along with the scroll. The previous fix would resolve this too.
Only start a terminal highlight once a drag leaves the pressed cell
mvanhorn commentedon Sep 23, 2026
Thanks, that was the missing piece. The mouse SDK calls SetSelectionEnd on every held-button event, even while the pointer is still inside the pressed cell, so a slight wobble during a click highlighted one character and copied it. The vim case comes from the same path: vim receives the click, but the drag events after it were still painting a terminal highlight, and that is the highlight you saw stay put while vim scrolled.
I reworked #126 around this instead of removing highlight-to-copy. A highlight now starts only once the drag leaves the pressed cell, and when the running program tracks the mouse, clicks and drags go to it alone. Real drags, double-click and triple-click still copy. Shift+drag to override mouse tracking is a good idea, but the SDK currently ignores modified mouse events, so I left it out of this PR.
If you get a chance to try the branch on Wayland, I'd like to know whether the focus-click problem is gone for you.
zhengqunkoo commentedon Sep 24, 2026
I've tried it, please see the latest comment in the PR #126.
zhengqunkoo commentedon Sep 24, 2026
Possibly Out of Scope Items
Only start a terminal highlight once a drag leaves the pressed cell
Fix terminal clicks replacing the clipboard with a single cell
Fix terminal clicks replacing the clipboard with a single cell
Fix drag selection requiring two cells before a cell can be highlight…