From 1af63004ca5338872aa876b9fa43085f8b7656a0 Mon Sep 17 00:00:00 2001 From: Bryan Gilbert Date: Tue, 9 May 2017 10:10:13 -0400 Subject: [PATCH] disable copy on visual state change for BOTH mac and linux --- core/core-os.el | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/core/core-os.el b/core/core-os.el index d1b10662e..fc45d9eff 100644 --- a/core/core-os.el +++ b/core/core-os.el @@ -14,6 +14,12 @@ select-enable-clipboard t select-enable-primary t) +(after! evil + ;; stop copying each visual state move to the clipboard: + ;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on + ;; Most of this code grokked from: + ;; http://stackoverflow.com/questions/15873346/elisp-rename-macro + (advice-add #'evil-visual-update-x-selection :override #'ignore)) (cond (IS-MAC (setq mac-command-modifier 'meta @@ -46,15 +52,7 @@ exec-path))) (t (when (require 'osx-clipboard nil t) - (osx-clipboard-mode +1)))) - - (after! evil - ;; On OSX, stop copying each visual state move to the clipboard: - ;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on - ;; Most of this code grokked from: - ;; http://stackoverflow.com/questions/15873346/elisp-rename-macro - (when (or (featurep 'mac) (featurep 'ns)) - (advice-add #'evil-visual-update-x-selection :override #'ignore)))) + (osx-clipboard-mode +1))))) (IS-LINUX ;; nothing yet