summaryrefslogtreecommitdiffstats
path: root/contrib/less/line.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-11-16 22:24:31 +0000
committerdelphij <delphij@FreeBSD.org>2007-11-16 22:24:31 +0000
commit12ee5edf2f2943fb7ff47149c5bfba7f36b865b2 (patch)
tree840e6427c104a75a42837ced5e3276f0d2f98534 /contrib/less/line.c
parent6c8bd91302f47331d99af5e633b06e68121fd73d (diff)
downloadFreeBSD-src-12ee5edf2f2943fb7ff47149c5bfba7f36b865b2.zip
FreeBSD-src-12ee5edf2f2943fb7ff47149c5bfba7f36b865b2.tar.gz
Resolve conflicts; Update defines.h to reflect latest change.
Diffstat (limited to 'contrib/less/line.c')
-rw-r--r--contrib/less/line.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/less/line.c b/contrib/less/line.c
index 217c24c..944e02d 100644
--- a/contrib/less/line.c
+++ b/contrib/less/line.c
@@ -1047,6 +1047,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;
OpenPOWER on IntegriCloud