Introduction
Introduction Statistics Contact Development Disclaimer Help
tterm: do not terminate VT100 attributes with a semicolon - neatvi - [fork] sim…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit e7c90ca9615b1a90035d3b607ca09cb2a538fcd5
parent 174014fe69371a038454126b0b1b7fcc1d077540
Author: Ali Gholami Rudi <[email protected]>
Date: Mon, 15 Jun 2015 19:10:09 +0430
tterm: do not terminate VT100 attributes with a semicolon
Reported by Christian Neukirchen <[email protected]>.
Diffstat:
M term.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/term.c b/term.c
t@@ -171,22 +171,22 @@ char *term_att(int att, int old)
int bg = SYN_BG(att);
if (att == old)
return "";
- s += sprintf(s, "\33[m\33[");
+ s += sprintf(s, "\33[");
if (fg & SYN_BD)
- s += sprintf(s, "1;");
+ s += sprintf(s, ";1");
if (fg & SYN_IT)
- s += sprintf(s, "3;");
+ s += sprintf(s, ";3");
else if (fg & SYN_RV)
- s += sprintf(s, "7;");
+ s += sprintf(s, ";7");
if ((fg & 0xff) < 8)
- s += sprintf(s, "%d;", 30 + (fg & 0xff));
+ s += sprintf(s, ";%d", 30 + (fg & 0xff));
else
- s += sprintf(s, "38;5;%d;", (fg & 0xff));
+ s += sprintf(s, ";38;5;%d", (fg & 0xff));
if (bg) {
if ((bg & 0xff) < 8)
- s += sprintf(s, "%d;", 40 + (bg & 0xff));
+ s += sprintf(s, ";%d", 40 + (bg & 0xff));
else
- s += sprintf(s, "48;5;%d;", (bg & 0xff));
+ s += sprintf(s, ";48;5;%d", (bg & 0xff));
}
s += sprintf(s, "m");
return buf;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.