summaryrefslogtreecommitdiffstats
path: root/contrib/nvi
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2002-01-31 13:45:31 +0000
committersheldonh <sheldonh@FreeBSD.org>2002-01-31 13:45:31 +0000
commit02a885aab729802f4ccaf60b80bfeac26934af6d (patch)
tree3f71277dc9712ee6fe08f7dc01b69096ba1563b9 /contrib/nvi
parentb9c368624058a79e2318f0f4f5aa84b3a8569eee (diff)
downloadFreeBSD-src-02a885aab729802f4ccaf60b80bfeac26934af6d.zip
FreeBSD-src-02a885aab729802f4ccaf60b80bfeac26934af6d.tar.gz
Merge rev 1.1.1.2 from the vendor branch: fix leftright scrolling for
long lines
Diffstat (limited to 'contrib/nvi')
-rw-r--r--contrib/nvi/vi/vs_line.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/nvi/vi/vs_line.c b/contrib/nvi/vi/vs_line.c
index dd8dba5..514b426 100644
--- a/contrib/nvi/vi/vs_line.c
+++ b/contrib/nvi/vi/vs_line.c
@@ -271,7 +271,10 @@ empty: (void)gp->scr_addstr(sp,
cols_per_screen = sp->cols;
/* Put starting info for this line in the cache. */
- if (scno != skip_cols) {
+ if (offset_in_line >= len) {
+ smp->c_sboff = offset_in_line;
+ smp->c_scoff = 255;
+ } else if (scno != skip_cols) {
smp->c_sboff = offset_in_line;
smp->c_scoff =
offset_in_char = chlen - (scno - skip_cols);
OpenPOWER on IntegriCloud