Merge pull request #56 from gilbertw1/feature-disable-visual-state-copy

disable copy on visual state change for BOTH mac and linux
This commit is contained in:
Henrik Lissner 2017-05-09 17:05:24 +02:00 committed by GitHub
commit 77a229a39c

View file

@ -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