From 11fa4c47513c298a58113f8fd2a473ec7f643254 Mon Sep 17 00:00:00 2001 From: stefanf Date: Sun, 11 Mar 2007 18:30:22 +0000 Subject: Merge the following changes from NetBSD: chared.h 1.17, common.c 1.19, emacs.c 1.21, key.c 1.18, key.h 1.9, map.c 1.23, term.c 1.42, term.h 1.17, vi.c 1.25: # Print the actual eofc, instead of ^D\b\b. # Change internal character decoding to prevent buffer oveflows. key.c 1.19, key.h 1.10: # move declaration to header file. term.c 1.43: # Coverity CID 806: Prevent NULL deref term.c 1.44: # Coverity CID 1668: Plug memory leak. term.c 1.45: # Fix compilation. MFC after: 3 weeks --- lib/libedit/vi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/libedit/vi.c') diff --git a/lib/libedit/vi.c b/lib/libedit/vi.c index 2d611fb..ae57e07 100644 --- a/lib/libedit/vi.c +++ b/lib/libedit/vi.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: vi.c,v 1.24 2005/08/10 12:46:24 christos Exp $ + * $NetBSD: vi.c,v 1.25 2006/03/06 21:11:56 christos Exp $ */ #if !defined(lint) && !defined(SCCSID) @@ -595,13 +595,12 @@ vi_delete_prev_char(EditLine *el, int c __unused) */ protected el_action_t /*ARGSUSED*/ -vi_list_or_eof(EditLine *el, int c __unused) +vi_list_or_eof(EditLine *el, int c) { if (el->el_line.cursor == el->el_line.lastchar) { if (el->el_line.cursor == el->el_line.buffer) { - term_overwrite(el, STReof, 4); /* then do a EOF */ - term__flush(); + term_writec(el, c); /* then do a EOF */ return (CC_EOF); } else { /* -- cgit v1.1