From: Chris Hanson Date: Mon, 20 Nov 1995 10:26:55 +0000 (+0000) Subject: Fix bug: when comparing interprogram-paste string to kill-ring, X-Git-Tag: 20090517-FFI~5722 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=43f31627f1cb3eb52192c879315f710e847af780;p=mit-scheme.git Fix bug: when comparing interprogram-paste string to kill-ring, compare to last string killed, not last string yanked. Otherwise, when yanking from elsewhere in the ring, another copy of the last string killed will be inserted in the kill ring. --- diff --git a/v7/src/edwin/kilcom.scm b/v7/src/edwin/kilcom.scm index 604f7dcb7..f56dace30 100644 --- a/v7/src/edwin/kilcom.scm +++ b/v7/src/edwin/kilcom.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: kilcom.scm,v 1.69 1995/11/20 08:00:51 cph Exp $ +;;; $Id: kilcom.scm,v 1.70 1995/11/20 10:26:55 cph Exp $ ;;; ;;; Copyright (c) 1985, 1989-95 Massachusetts Institute of Technology ;;; @@ -293,12 +293,13 @@ comes the newest one." (let ((start (mark-right-inserting-copy (current-point)))) (let ((end (mark-left-inserting-copy start))) (insert-string (let ((paste (and (= offset 0) (os/interprogram-paste)))) - (if (and paste (not (string-null? paste))) + (if (and paste + (not (string-null? paste)) + (let ((kill-ring (ref-variable kill-ring))) + (or (null? kill-ring) + (not (string=? paste (car kill-ring)))))) (begin - (if (let ((kill-ring (ref-variable kill-ring))) - (or (null? kill-ring) - (not (string=? paste (car kill-ring))))) - (kill-ring-save-1 paste)) + (kill-ring-save-1 paste) paste) (begin ((ref-command rotate-yank-pointer) offset)