tled: do not highlight if line is longer than lim - neatvi - [fork] simple vi-type editor with UTF-8 support
(HTM) git clone git://src.adamsgaard.dk/neatvi
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit faba1abe11f6abdeea5b9b8da810638e5eb3f3a1
(DIR) parent c5d5dede6ae7fd6678ca662be496a2dccfe5396d
(HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Thu, 17 Feb 2022 12:28:31 +0330
led: do not highlight if line is longer than lim
Diffstat:
M led.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/led.c b/led.c
t@@ -79,7 +79,7 @@ static char *led_render(char *s0, int cbeg, int cend, char *syn)
for (j = 0; j < curwid; j++)
off[led_posctx(ctx, pos[i] + j, cbeg, cend)] = i;
}
- att = syn_highlight(xhl ? syn : "", s0);
+ att = syn_highlight((n <= xlim && xhl) ? syn : "", s0);
/* the attribute of \n character is used for blanks */
for (i = 0; i < n; i++)
if (chrs[i][0] == '\n')