aboutsummaryrefslogtreecommitdiff
path: root/line.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2012-06-26 20:38:53 +0000
committerXin LI <delphij@FreeBSD.org>2012-06-26 20:38:53 +0000
commitae8c2162b0f1c1823dae013469f900b9882b77a2 (patch)
tree9492f724d6c5c2081c7f6b978b27d62af6523d31 /line.c
parent5b2db585ea1bc974ea3553d32447fba4e9ec0c2a (diff)
downloadsrc-ae8c2162b0f1c1823dae013469f900b9882b77a2.tar.gz
src-ae8c2162b0f1c1823dae013469f900b9882b77a2.zip
Vendor import of less v449 (beta).vendor/less/v449
Notes
Notes: svn path=/vendor/less/dist/; revision=237607 svn path=/vendor/less/v449/; revision=237608; tag=vendor/less/v449
Diffstat (limited to 'line.c')
-rw-r--r--line.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/line.c b/line.c
index 798d4f26707e..4384b19d2e35 100644
--- a/line.c
+++ b/line.c
@@ -1,12 +1,11 @@
-/*
- * 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.
+ */
/*
@@ -27,6 +26,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
@@ -585,7 +585,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