about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-01-29 12:13:35 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-01-29 12:22:32 -0800
commit90fc24ed041736d6cdebc74e5fd2e260e3803c3b (patch)
tree24938f1e7629e8f9cad4f4576f7a0ee634eec4fd /src
parent1f620a28d7e4af5697a05aca15e48e3db0db57b8 (diff)
downloadteliva-90fc24ed041736d6cdebc74e5fd2e260e3803c3b.tar.gz
fixup! redo lua vs prose
Forgot to include some hunks.
Diffstat (limited to 'src')
-rw-r--r--src/kilo.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/kilo.c b/src/kilo.c
index 28edeaf..c7754e4 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -275,24 +275,26 @@ static void editorUpdateSyntax(erow *row) {
         }
 
         /* Handle "" and '' */
-        if (in_string) {
-            row->hl[i] = HL_STRING;
-            if (*p == '\\' && *(p+1)) {
-                row->hl[i+1] = HL_STRING;
-                p += 2; i += 2;
-                prev_sep = 0;
-                continue;
-            }
-            if (*p == in_string) in_string = 0;
-            p++; i++;
-            continue;
-        } else {
-            if (*p == '"' || *p == '\'') {
-                in_string = *p;
+        if (E.syntax == &LuaSyntax) {  // obscene hack
+            if (in_string) {
                 row->hl[i] = HL_STRING;
+                if (*p == '\\' && *(p+1)) {
+                    row->hl[i+1] = HL_STRING;
+                    p += 2; i += 2;
+                    prev_sep = 0;
+                    continue;
+                }
+                if (*p == in_string) in_string = 0;
                 p++; i++;
-                prev_sep = 0;
                 continue;
+            } else {
+                if (*p == '"' || *p == '\'') {
+                    in_string = *p;
+                    row->hl[i] = HL_STRING;
+                    p++; i++;
+                    prev_sep = 0;
+                    continue;
+                }
             }
         }