diff options
| author | christos <christos@NetBSD.org> | 2019-06-30 13:30:15 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2019-06-30 13:30:15 +0000 |
| commit | 188a664f6bb1973f38afc7d77dd67dae563e5f16 (patch) | |
| tree | 8765d1482167bda9829c72338315b869e10ba437 /lib/libedit | |
| parent | 5c1ef4f7469198f0f4fdb376c084d50b0df164ba (diff) | |
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.
Diffstat (limited to 'lib/libedit')
| -rw-r--r-- | lib/libedit/terminal.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libedit/terminal.c b/lib/libedit/terminal.c index 5855494749c..d6b36cade3d 100644 --- a/lib/libedit/terminal.c +++ b/lib/libedit/terminal.c @@ -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 where) 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 */ |
