# HG changeset patch # User Richard M. Stallman # Date 743448285 0 # Node ID af9d2ade78ed0808705ce101d55f30d085a856f3 # Parent 5988aab467cc3ef71aacb749a5ac0738464205bc (x-select-text): Always set the cut buffer, but sometimes set it to nothing. Don't put large strings in clipboard. diff -r 5988aab467cc -r af9d2ade78ed lisp/term/x-win.el --- a/lisp/term/x-win.el Fri Jul 23 16:57:24 1993 +0000 +++ b/lisp/term/x-win.el Fri Jul 23 17:24:45 1993 +0000 @@ -491,8 +491,10 @@ ;;; from x-cut-buffer-or-selection-value. (defvar x-last-selected-text nil) +;;; It is said that overlarge strings are slow to put into the cut buffer, +;;; and would crash the clipboard. (defvar x-cut-buffer-max 20000 - "Max number of characters to put in the cut buffer.") + "Max number of characters to put in the cut buffer or clipboard.") ;;; Make TEXT, a string, the primary and clipboard X selections. ;;; If you are running xclipboard, this means you can effectively @@ -503,8 +505,10 @@ ;; Don't send the cut buffer too much text. ;; It becomes slow, and if really big it causes errors. (if (< (length text) x-cut-buffer-max) - (x-set-cut-buffer text push)) - (x-set-selection 'CLIPBOARD text) + (progn + (x-set-cut-buffer text push) + (x-set-selection 'CLIPBOARD text)) + (x-set-cut-buffer "" push)) (x-set-selection 'PRIMARY text) (setq x-last-selected-text text))