Add clipboard support for multicursors

Fixes #1721
This commit is contained in:
Zachary Yedidia
2020-07-04 21:26:36 -04:00
parent d8596919a6
commit 037c3c993f
4 changed files with 17 additions and 6 deletions

View File

@@ -128,7 +128,7 @@ func (c *Cursor) End() {
func (c *Cursor) CopySelection(target clipboard.Register) {
if c.HasSelection() {
if target != clipboard.PrimaryReg || c.buf.Settings["useprimary"].(bool) {
clipboard.Write(string(c.GetSelection()), target)
clipboard.WriteMulti(string(c.GetSelection()), target, c.Num)
}
}
}