Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit PR/54329: Raphael Ross: According to https://www...
details: https://anonhg.NetBSD.org/src/rev/4aff6004630a
branches: trunk
changeset: 962143:4aff6004630a
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 29 21:35:09 2019 +0000
description:
PR/54329: Raphael Ross: According to https://www.gnu.org/software/termutils/\
manual/termcap-1.3/html_chapter/termcap_4.html#SEC23 the cursor move multiple
escapes have undefined results when moving out of the screen. Stop using DO
to move down multiple lines and use a loop of newlines instead.
diffstat:
lib/libedit/terminal.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diffs (38 lines):
diff -r b68c81b66728 -r 4aff6004630a lib/libedit/terminal.c
--- a/lib/libedit/terminal.c Sat Jun 29 20:50:01 2019 +0000
+++ b/lib/libedit/terminal.c Sat Jun 29 21:35:09 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: terminal.c,v 1.36 2019/04/12 17:30:49 christos Exp $ */
+/* $NetBSD: terminal.c,v 1.37 2019/06/29 21:35:09 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95";
#else
-__RCSID("$NetBSD: terminal.c,v 1.36 2019/04/12 17:30:49 christos Exp $");
+__RCSID("$NetBSD: terminal.c,v 1.37 2019/06/29 21:35:09 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -509,15 +509,10 @@
return;
}
if ((del = where - el->el_cursor.v) > 0) {
- if ((del > 1) && GoodStr(T_DO)) {
- terminal_tputs(el, tgoto(Str(T_DO), del, del), del);
- del = 0;
- } else {
- for (; del > 0; del--)
- terminal__putc(el, '\n');
- /* because the \n will become \r\n */
- el->el_cursor.h = 0;
- }
+ for (; del > 0; del--)
+ terminal__putc(el, '\n');
+ /* because the \n will become \r\n */
+ el->el_cursor.h = 0;
} else { /* del < 0 */
if (GoodStr(T_UP) && (-del > 1 || !GoodStr(T_up)))
terminal_tputs(el, tgoto(Str(T_UP), -del, -del), -del);
Home |
Main Index |
Thread Index |
Old Index