From e91304b1e98ad890658c10fe0da3a5956fa3df9d Mon Sep 17 00:00:00 2001 From: night0721 Date: Tue, 12 Nov 2024 11:13:15 +0000 Subject: [PATCH] Highlight tab new line and carriage return in escape seqeunce --- vip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vip.c b/vip.c index 944d5ba..2dfd0cd 100644 --- a/vip.c +++ b/vip.c @@ -823,13 +823,13 @@ void update_highlight(row_t *row) } if (in_escape) { - if (!(c > 47 && c < 58)) { - in_escape = 0; - } else { + if (c > 47 && c < 58 || c == 'n' || c == 't' || c == 'r') { row->hl[i] = ESCAPE; i++; prev_sep = 0; continue; + } else { + in_escape = 0; } } else { if (c == '\\') {