summaryrefslogtreecommitdiffstats
path: root/contrib/less/line.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2012-06-26 23:17:33 +0000
committerdelphij <delphij@FreeBSD.org>2012-06-26 23:17:33 +0000
commit922d40fed4b7f6bb0aafe327600825f9680ce0e7 (patch)
tree1acc67942c59e279c426e0a72ee0ad94cb0ed3ba /contrib/less/line.c
parentbd43c5e6d640101f1bd6cca7e83586ae41e1a065 (diff)
downloadFreeBSD-src-922d40fed4b7f6bb0aafe327600825f9680ce0e7.zip
FreeBSD-src-922d40fed4b7f6bb0aafe327600825f9680ce0e7.tar.gz
MFV: less v449.
Diffstat (limited to 'contrib/less/line.c')
-rw-r--r--contrib/less/line.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/contrib/less/line.c b/contrib/less/line.c
index 0a951f6..6bc7410 100644
--- a/contrib/less/line.c
+++ b/contrib/less/line.c
@@ -1,13 +1,12 @@
/* $FreeBSD$ */
-/*
- * Copyright (C) 1984-2011 Mark Nudelman
- *
- * You may distribute under the terms of either the GNU General Public
- * License or the Less License, as specified in the README file.
- *
- * For more information about less, or for information on how to
- * contact the author, see the README file.
- */
+/*
+ * Copyright (C) 1984-2012 Mark Nudelman
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Less License, as specified in the README file.
+ *
+ * For more information, see the README file.
+ */
/*
@@ -28,6 +27,7 @@ public int hshift; /* Desired left-shift of output line buffer */
public int tabstops[TABSTOP_MAX] = { 0 }; /* Custom tabstops */
public int ntabstops = 1; /* Number of tabstops */
public int tabdefault = 8; /* Default repeated tabstops */
+public POSITION highest_hilite; /* Pos of last hilite in file found so far */
static int curr; /* Index into linebuf */
static int column; /* Printable length, accounting for
@@ -586,7 +586,12 @@ store_char(ch, a, rep, pos)
* Override the attribute passed in.
*/
if (a != AT_ANSI)
+ {
+ if (highest_hilite != NULL_POSITION &&
+ pos > highest_hilite)
+ highest_hilite = pos;
a |= AT_HILITE;
+ }
}
}
#endif
OpenPOWER on IntegriCloud