about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-29 22:49:47 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-29 22:49:47 -0800
commitce3ad17a0550cb85ea47fe79412c40d95a7a9a4e (patch)
tree1dcfa0ded7eb06022a51712173b1a49127a891a5 /src
parent85e06b7b0f5a803013acdfda609c5bb61218ea97 (diff)
downloadteliva-ce3ad17a0550cb85ea47fe79412c40d95a7a9a4e.tar.gz
kilo bugfix: syntax highlight final word in line
Kilo likely never ran into this because it's only been tested on C,
which uses semi-colons at the end of each statement.
Diffstat (limited to 'src')
-rw-r--r--src/kilo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kilo.c b/src/kilo.c
index bb4531e..1e1172a 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -279,7 +279,7 @@ static void editorUpdateSyntax(erow *row) {
                 int kw2 = keywords[j][klen-1] == '|';
                 if (kw2) klen--;
 
-                if (klen < ileft && !memcmp(p,keywords[j],klen) &&
+                if (klen <= ileft && !memcmp(p,keywords[j],klen) &&
                     is_separator(*(p+klen)))
                 {
                     /* Keyword */