]> git.mdlowis.com Git - projs/tide.git/commitdiff
added back in syntax highlighting and fixed coloring of normal text and regions
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 21 Mar 2018 02:32:07 +0000 (22:32 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 21 Mar 2018 02:32:07 +0000 (22:32 -0400)
lib/colors.c
lib/config.c

index 34acaca45c8c2bcef3437a5d2bb95265578ef84e..651c15ff9b14936842321405c0e9abc4a22c54b1 100644 (file)
@@ -25,7 +25,6 @@ SyntaxSpan* colors_scan(SyntaxSpan* spans, Buf* buf, size_t beg, size_t end) {
     /* if the engine died, clear all highlights and quit */
     if (ChildIn < 0 || !buf->path)
         return colors_rewind(spans, 0);
-#if 0
     /* commence the highlighting */
     if (beg < end) {
         write_chunk(buf, beg, end);
@@ -35,7 +34,7 @@ SyntaxSpan* colors_scan(SyntaxSpan* spans, Buf* buf, size_t beg, size_t end) {
             e = read_num();
             c = read_num();
             if (e > 0 && c > 0) {
-                c = (c > 15 ? config_get_int(SynNormal + (c >> 4) - 1) : c) & 0xf;
+                c = (c > 15 ? Colors[SynNormal + (c >> 4) - 1].fg : c);
                 currspan = mkspan(beg+b, beg+e-1, c, currspan);
             }
             if (!firstspan)
@@ -44,7 +43,6 @@ SyntaxSpan* colors_scan(SyntaxSpan* spans, Buf* buf, size_t beg, size_t end) {
         fflush(stdout);
         DataBeg = DataEnd = Buffer;
     }
-#endif
     return firstspan;
 }
 
index 16bce14e2f47e8ad97a4acf0f0eaa57ee9ecd75d..20d600e73ce317a23237184f0372203b2010fedd 100644 (file)
@@ -28,7 +28,7 @@ int /* Integer config options */
     ClickTime = 500,
     MaxScanDist = 0,
     LineNums = ON,
-    Syntax = OFF,
+    Syntax = ON,
     CopyIndent = ON,
     TrimOnSave = ON,
     ExpandTabs = ON;