summaryrefslogtreecommitdiffstats
path: root/mbbsd/edit.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-05-23 03:43:28 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-05-23 03:43:28 +0800
commit98e34e734e91e8d1c982aa0674faf9f7bcb4e991 (patch)
treec4cf7969adc4e7fc245b69589431376ecd860e31 /mbbsd/edit.c
parent4e99d190bd3613df80d09a9244fe964c15a8f1c9 (diff)
downloadpttbbs-98e34e734e91e8d1c982aa0674faf9f7bcb4e991.tar
pttbbs-98e34e734e91e8d1c982aa0674faf9f7bcb4e991.tar.gz
pttbbs-98e34e734e91e8d1c982aa0674faf9f7bcb4e991.tar.bz2
pttbbs-98e34e734e91e8d1c982aa0674faf9f7bcb4e991.tar.lz
pttbbs-98e34e734e91e8d1c982aa0674faf9f7bcb4e991.tar.xz
pttbbs-98e34e734e91e8d1c982aa0674faf9f7bcb4e991.tar.zst
pttbbs-98e34e734e91e8d1c982aa0674faf9f7bcb4e991.zip
refine pmore movie syntax highlight, again
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4460 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r--mbbsd/edit.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 89a1e729..d2bc6d08 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -2314,11 +2314,11 @@ void syn_pmore_render(char *os, int len, char *buf)
return;
case '#':
- *buf++ = attr;
+ *buf++ = attr++;
while (len > 0)
{
- if (*s == '#') attr++;
*buf++ = attr;
+ if (*s == '#') attr++;
len--; s++;
}
return;
@@ -2342,7 +2342,7 @@ void syn_pmore_render(char *os, int len, char *buf)
prefix = 1;
while (len > 0 &&
( (isascii(*s) && isalnum(*s)) ||
- strchr("+-:lpf,", *s)) )
+ strchr("+-,:lpf", *s)) )
{
if (prefix)
{
@@ -2603,11 +2603,10 @@ edit_outs_attr_n(const char *text, int n, int attr)
// only render when attribute was changed.
if (mattr != *pmattr)
{
- mattr = *pmattr;
- if (mattr)
+ if (*pmattr)
{
prints(ANSI_COLOR(1;3%d),
- (mattr % 7) +1);
+ 8 - ((mattr-1) % 7+1) );
} else {
outs(ANSI_RESET);
}