Remove unnecessary code

This commit is contained in:
Night Kaly 2024-07-03 13:14:31 +01:00
parent 42c2b39692
commit f3c3ed06c8
Signed by: night0721
GPG key ID: 957D67B8DB7A119B
2 changed files with 0 additions and 3 deletions

View file

@ -26,14 +26,12 @@ char *syntax_to_color(int hl, size_t *len)
case HL_MATCH:;
char *str = malloc(COLOR_LEN * 2 + 1);
snprintf(str, COLOR_LEN * 2 + 1, "%s%s", BLACK_BG, SKY_FG);
str[COLOR_LEN * 2] = '\0';
*len = COLOR_LEN * 2;
return str;
case HL_RESET:;
char *res = malloc(COLOR_LEN * 2 + 1);
snprintf(res, COLOR_LEN * 2 + 1, "%s%s", WHITE_BG, BLACK_FG);
res[COLOR_LEN * 2] = '\0';
*len = COLOR_LEN * 2;
return res;

View file

@ -178,7 +178,6 @@ void draw_rows(struct abuf *ab)
memcpy(current_color, color, len);
abAppend(ab, color, len);
}
fclose(f);
free(color);
abAppend(ab, &c[j], 1);
}