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.
This commit is contained in:
parent
a7f5601ea5
commit
bd6ed3b8c1
|
@ -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
|
* Emacs-like command line editing and history
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#ifndef lint
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1268,7 +1268,9 @@ x_meta_yank(c)
|
||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
int len;
|
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_e_puts("\nyank something first");
|
||||||
x_redraw(-1);
|
x_redraw(-1);
|
||||||
return KSTD;
|
return KSTD;
|
||||||
|
|
Loading…
Reference in New Issue