Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Don't delete the current line in vi mode when ty...
details: https://anonhg.NetBSD.org/src/rev/5a7b6d4ff0e7
branches: trunk
changeset: 583494:5a7b6d4ff0e7
user: christos <christos%NetBSD.org@localhost>
date: Tue Aug 09 16:40:12 2005 +0000
description:
Don't delete the current line in vi mode when typing 'yy'.
>From Stefan Farfeleder.
diffstat:
lib/libedit/vi.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 9b0b922055a0 -r 5a7b6d4ff0e7 lib/libedit/vi.c
--- a/lib/libedit/vi.c Tue Aug 09 15:24:26 2005 +0000
+++ b/lib/libedit/vi.c Tue Aug 09 16:40:12 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vi.c,v 1.22 2005/08/08 14:05:37 christos Exp $ */
+/* $NetBSD: vi.c,v 1.23 2005/08/09 16:40:12 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: vi.c,v 1.22 2005/08/08 14:05:37 christos Exp $");
+__RCSID("$NetBSD: vi.c,v 1.23 2005/08/09 16:40:12 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -71,8 +71,10 @@
el->el_line.lastchar - el->el_line.buffer);
el->el_chared.c_vcmd.action = NOP;
el->el_chared.c_vcmd.pos = 0;
- el->el_line.lastchar = el->el_line.buffer;
- el->el_line.cursor = el->el_line.buffer;
+ if (!(c & YANK)) {
+ el->el_line.lastchar = el->el_line.buffer;
+ el->el_line.cursor = el->el_line.buffer;
+ }
if (c & INSERT)
el->el_map.current = el->el_map.key;
Home |
Main Index |
Thread Index |
Old Index