Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit From Jilles Tjoelker:
details: https://anonhg.NetBSD.org/src/rev/cd9bb73bacb4
branches: trunk
changeset: 778397:cd9bb73bacb4
user: christos <christos%NetBSD.org@localhost>
date: Sat Mar 24 20:08:43 2012 +0000
description:
>From Jilles Tjoelker:
Do not move the cursor for ed-delete-next-char in emacs mode.
This makes ed-delete-next-char suitable for mapping to the <Delete> key.
Behaviour in vi mode is unchanged (for 'x').
diffstat:
lib/libedit/common.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diffs (37 lines):
diff -r 0fffa817d849 -r cd9bb73bacb4 lib/libedit/common.c
--- a/lib/libedit/common.c Sat Mar 24 19:04:05 2012 +0000
+++ b/lib/libedit/common.c Sat Mar 24 20:08:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.28 2011/07/29 20:58:07 christos Exp $ */
+/* $NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: common.c,v 1.28 2011/07/29 20:58:07 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -165,15 +165,12 @@
return CC_ERROR;
#endif
}
- } else {
- if (el->el_line.cursor != el->el_line.buffer)
- el->el_line.cursor--;
- else
+ } else
return CC_ERROR;
- }
}
c_delafter(el, el->el_state.argument); /* delete after dot */
- if (el->el_line.cursor >= el->el_line.lastchar &&
+ if (el->el_map.type == MAP_VI &&
+ el->el_line.cursor >= el->el_line.lastchar &&
el->el_line.cursor > el->el_line.buffer)
/* bounds check */
el->el_line.cursor = el->el_line.lastchar - 1;
Home |
Main Index |
Thread Index |
Old Index