diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2014-01-18 16:11:03 +0100 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2014-01-18 16:11:03 +0100 |
commit | 5aa78c2dbab6e1e2174957d5c4e16da0fc971a87 (patch) | |
tree | 48fe7d8a205ef02241ed7efc3deac9359337dec1 /lisp/term | |
parent | 5197f0c2fee01c473b4876f6a49e784250f63640 (diff) | |
download | emacs-5aa78c2dbab6e1e2174957d5c4e16da0fc971a87.tar.gz |
* lisp/term/common-win.el (saved-region-selection): Defvar it.
(x-select-text): Set saved-region-selection.
Fixes: debbugs:16382
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/common-win.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el index 36417491c2e..31aa5ffdc42 100644 --- a/lisp/term/common-win.el +++ b/lisp/term/common-win.el @@ -47,6 +47,7 @@ This variable is not used by the Nextstep port." (defvar x-select-enable-primary) ; x-win.el (defvar x-last-selected-text-primary) (defvar x-last-selected-text-clipboard) +(defvar saved-region-selection) ; simple.el (defun x-select-text (text) "Select TEXT, a string, according to the window system. @@ -77,6 +78,10 @@ is not used)." (x-set-selection 'PRIMARY text) (setq x-last-selected-text-primary text)) (when x-select-enable-clipboard + ;; When cutting, the selection is cleared and PRIMARY set to + ;; the empty string. Prevent that, PRIMARY should not be reset + ;; by cut (Bug#16382). + (setq saved-region-selection text) (x-set-selection 'CLIPBOARD text) (setq x-last-selected-text-clipboard text)))))) |