Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ksh From OpenBSD:



details:   https://anonhg.NetBSD.org/src/rev/42c5958448a8
branches:  trunk
changeset: 550950:42c5958448a8
user:      wiz <wiz%NetBSD.org@localhost>
date:      Tue Aug 26 08:52:03 2003 +0000

description:
>From OpenBSD:
revision 1.21
date: 2003/08/02 19:26:15;  author: fgsch;  state: Exp;  lines: +4 -2
On ESC-y ESC-y (yank-pop), also check that there is something to
insert (some text has been killed before). from otto@, fix bug report 3384.

On yank-pop error (no yank before), reset the index to killstack so
another yank-pop does not mangle the prompt if nothing was yanked, and
to avoid replacing a text when it shouldn't
(yank <something> yank-pop yank-pop).
otto@ ok.

diffstat:

 bin/ksh/emacs.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 6e14ae8e891f -r 42c5958448a8 bin/ksh/emacs.c
--- a/bin/ksh/emacs.c   Tue Aug 26 08:40:51 2003 +0000
+++ b/bin/ksh/emacs.c   Tue Aug 26 08:52:03 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emacs.c,v 1.19 2003/08/26 08:40:51 wiz Exp $   */
+/*     $NetBSD: emacs.c,v 1.20 2003/08/26 08:52:03 wiz Exp $   */
 
 /*
  *  Emacs-like command line editing and history
@@ -10,7 +10,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: emacs.c,v 1.19 2003/08/26 08:40:51 wiz Exp $");
+__RCSID("$NetBSD: emacs.c,v 1.20 2003/08/26 08:52:03 wiz Exp $");
 #endif
 
 
@@ -1268,7 +1268,9 @@
        int c;
 {
        int     len;
-       if (x_last_command != XFUNC_yank && x_last_command != XFUNC_meta_yank) {
+       if ((x_last_command != XFUNC_yank && x_last_command != XFUNC_meta_yank)
+           || killstack[killtp] == 0) {
+               killtp = killsp;
                x_e_puts("\nyank something first");
                x_redraw(-1);
                return KSTD;



Home | Main Index | Thread Index | Old Index