Fast and reasonably complete (framebuffer) terminal emulator (Zig fork)

Drop support for (broken) 0x9b CSI

mintsuki 41a5256f cf304a78

Changed files
-12
-11
flanterm.c
···
ctx->cursor_enabled = true;
ctx->scroll_enabled = true;
ctx->control_sequence = false;
-
ctx->csi = false;
ctx->escape = false;
ctx->osc = false;
ctx->osc_escape = false;
···
return;
}
-
if (ctx->csi == true) {
-
ctx->csi = false;
-
goto is_csi;
-
}
-
size_t x, y;
ctx->get_cursor_pos(ctx, &x, &y);
···
ctx->osc = true;
return;
case '[':
-
is_csi:
for (size_t i = 0; i < FLANTERM_MAX_ESC_VALUES; i++)
ctx->esc_values[i] = 0;
ctx->esc_values_i = 0;
···
if (ctx->discard_next || (c == 0x18 || c == 0x1a)) {
ctx->discard_next = false;
ctx->escape = false;
-
ctx->csi = false;
ctx->control_sequence = false;
ctx->unicode_remaining = 0;
ctx->osc = false;
···
case 0x00:
case 0x7f:
return;
-
case 0x9b:
-
ctx->csi = true;
-
// FALLTHRU
case 0x1b:
ctx->escape_offset = 0;
ctx->escape = true;
···
ctx->cursor_enabled = true;
ctx->scroll_enabled = true;
ctx->control_sequence = false;
ctx->escape = false;
ctx->osc = false;
ctx->osc_escape = false;
···
return;
}
size_t x, y;
ctx->get_cursor_pos(ctx, &x, &y);
···
ctx->osc = true;
return;
case '[':
for (size_t i = 0; i < FLANTERM_MAX_ESC_VALUES; i++)
ctx->esc_values[i] = 0;
ctx->esc_values_i = 0;
···
if (ctx->discard_next || (c == 0x18 || c == 0x1a)) {
ctx->discard_next = false;
ctx->escape = false;
ctx->control_sequence = false;
ctx->unicode_remaining = 0;
ctx->osc = false;
···
case 0x00:
case 0x7f:
return;
case 0x1b:
ctx->escape_offset = 0;
ctx->escape = true;
-1
flanterm.h
···
bool cursor_enabled;
bool scroll_enabled;
bool control_sequence;
-
bool csi;
bool escape;
bool osc;
bool osc_escape;
···
bool cursor_enabled;
bool scroll_enabled;
bool control_sequence;
bool escape;
bool osc;
bool osc_escape;