Skip to content

Commit

Permalink
Add option to disable use of a the primary clipboard
Browse files Browse the repository at this point in the history
Closes #544
  • Loading branch information
zyedidia committed Feb 8, 2017
1 parent 28af256 commit 5dc8fe4
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 50 deletions.
4 changes: 3 additions & 1 deletion cmd/micro/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ func (c *Cursor) Goto(b Cursor) {
// CopySelection copies the user's selection to either "primary" or "clipboard"
func (c *Cursor) CopySelection(target string) {
if c.HasSelection() {
clipboard.WriteAll(c.GetSelection(), target)
if target != "primary" || c.buf.Settings["useprimary"].(bool) {
clipboard.WriteAll(c.GetSelection(), target)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/micro/runtime.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5dc8fe4

Please sign in to comment.