Module Name: src Committed By: christos Date: Sun Jun 30 13:30:15 UTC 2019
Modified Files: src/lib/libedit: terminal.c Log Message: Add a comment explaining why we don't use DO here. Correct the attribution on the previous patch: The patch was from Jordan Lewis and the report from Raphael Poss. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/libedit/terminal.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/terminal.c diff -u src/lib/libedit/terminal.c:1.37 src/lib/libedit/terminal.c:1.38 --- src/lib/libedit/terminal.c:1.37 Sat Jun 29 17:35:09 2019 +++ src/lib/libedit/terminal.c Sun Jun 30 09:30:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: terminal.c,v 1.37 2019/06/29 21:35:09 christos Exp $ */ +/* $NetBSD: terminal.c,v 1.38 2019/06/30 13:30:15 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.37 2019/06/29 21:35:09 christos Exp $"); +__RCSID("$NetBSD: terminal.c,v 1.38 2019/06/30 13:30:15 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -509,6 +509,10 @@ terminal_move_to_line(EditLine *el, int return; } if ((del = where - el->el_cursor.v) > 0) { + /* + * We don't use DO here because some terminals are buggy + * if the destination is beyond bottom of the screen. + */ for (; del > 0; del--) terminal__putc(el, '\n'); /* because the \n will become \r\n */