diff options
author | delphij <delphij@FreeBSD.org> | 2007-11-16 22:22:17 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-11-16 22:22:17 +0000 |
commit | e2b0c4a1d9f9f53e73cf7da116a4546c07cde418 (patch) | |
tree | 0c9762eeda7d2def39527db440983a3ea2c88c41 /contrib/less/line.c | |
parent | 9680b7d49a594123cfffb2bc9d11614d1a2625d0 (diff) | |
download | FreeBSD-src-e2b0c4a1d9f9f53e73cf7da116a4546c07cde418.zip FreeBSD-src-e2b0c4a1d9f9f53e73cf7da116a4546c07cde418.tar.gz |
Virgin import of less v415.
Diffstat (limited to 'contrib/less/line.c')
-rw-r--r-- | contrib/less/line.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/less/line.c b/contrib/less/line.c index d61b872..08ca3be 100644 --- a/contrib/less/line.c +++ b/contrib/less/line.c @@ -1046,6 +1046,23 @@ pdone(endline) linebuf[curr] = '\n'; attr[curr] = AT_NORMAL; curr++; + } + else if (ignaw && !auto_wrap && column >= sc_width) + { + /* + * Big horrible kludge. + * No-wrap terminals are too hard to deal with when they get in + * the state where a full screen width of characters have been + * output but the cursor is sitting on the right edge instead + * of at the start of the next line. + * So after we output a full line, we output an extra + * space and backspace to force the cursor to the + * beginning of the next line, like a sane terminal. + */ + linebuf[curr] = ' '; + attr[curr++] = AT_NORMAL; + linebuf[curr] = '\b'; + attr[curr++] = AT_NORMAL; } linebuf[curr] = '\0'; attr[curr] = AT_NORMAL; |