diff options
author | delphij <delphij@FreeBSD.org> | 2007-10-08 16:14:52 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-10-08 16:14:52 +0000 |
commit | aa9fcd738666aeeba852b8c048517501f6704bc0 (patch) | |
tree | 2a78cc9eb4488e323c6e10ad2cee170d3b3eed87 /contrib/less/line.c | |
parent | bb6dbdf2f382ed564a935433f1553a0c588e0f5f (diff) | |
download | FreeBSD-src-aa9fcd738666aeeba852b8c048517501f6704bc0.zip FreeBSD-src-aa9fcd738666aeeba852b8c048517501f6704bc0.tar.gz |
Virgin import of less v408.
Approved by: re (kensmith)
Diffstat (limited to 'contrib/less/line.c')
-rw-r--r-- | contrib/less/line.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/less/line.c b/contrib/less/line.c index e4b9731..d61b872 100644 --- a/contrib/less/line.c +++ b/contrib/less/line.c @@ -268,7 +268,7 @@ pshift(shift) while (shifted <= shift && from < curr) { c = linebuf[from]; - if (c == ESC && ctldisp == OPT_ONPLUS) + if (ctldisp == OPT_ONPLUS && IS_CSI_START(c)) { /* Keep cumulative effect. */ linebuf[to] = c; @@ -523,7 +523,7 @@ in_ansi_esc_seq() for (p = &linebuf[curr]; p > linebuf; ) { LWCHAR ch = step_char(&p, -1, linebuf); - if (ch == ESC) + if (IS_CSI_START(ch)) return (1); if (!is_ansi_middle(ch)) return (0); @@ -602,13 +602,13 @@ store_char(ch, a, rep, pos) /* Remove whole unrecognized sequence. */ do { --curr; - } while (linebuf[curr] != ESC); + } while (!IS_CSI_START(linebuf[curr])); return 0; } a = AT_ANSI; /* Will force re-AT_'ing around it. */ w = 0; } - else if (ctldisp == OPT_ONPLUS && ch == ESC) + else if (ctldisp == OPT_ONPLUS && IS_CSI_START(ch)) { a = AT_ANSI; /* Will force re-AT_'ing around it. */ w = 0; @@ -942,7 +942,7 @@ do_append(ch, rep, pos) } else if ((!utf_mode || is_ascii_char(ch)) && control_char((char)ch)) { do_control_char: - if (ctldisp == OPT_ON || (ctldisp == OPT_ONPLUS && ch == ESC)) + if (ctldisp == OPT_ON || (ctldisp == OPT_ONPLUS && IS_CSI_START(ch))) { /* * Output as a normal character. |