Highlight tab new line and carriage return in escape seqeunce

This commit is contained in:
Night Kaly 2024-11-12 11:13:15 +00:00
parent 59d11fe427
commit e91304b1e9
Signed by: night0721
SSH key fingerprint: SHA256:B/hgVwUoBpx5vdNsXl9w8XwZljA9766uk6T4ubZp5HM

6
vip.c
View file

@ -823,13 +823,13 @@ void update_highlight(row_t *row)
} }
if (in_escape) { if (in_escape) {
if (!(c > 47 && c < 58)) { if (c > 47 && c < 58 || c == 'n' || c == 't' || c == 'r') {
in_escape = 0;
} else {
row->hl[i] = ESCAPE; row->hl[i] = ESCAPE;
i++; i++;
prev_sep = 0; prev_sep = 0;
continue; continue;
} else {
in_escape = 0;
} }
} else { } else {
if (c == '\\') { if (c == '\\') {