vtgl

terminal emulator implemented in OpenGL
git clone anongit@rnpnr.xyz:vtgl.git
Log | Files | Refs | Feed | LICENSE

Commit: 3bd4216b2947d88e371c6b5de1ecb2fff44379af
Parent: 923782e086908681d52afed2279cd165487f677a
Author: Randy Palamar
Date:   Thu, 22 Aug 2024 19:25:11 -0600

osc: don't mark invalid when raw is exactly the correct length

Diffstat:
Mterminal.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/terminal.c b/terminal.c @@ -605,18 +605,16 @@ parse_osc(s8 *raw) cp = get_ascii(raw); osc.raw.len++; if (cp == '\a') - break; + return osc; if (cp == 0x1B && peek(*raw, 0) == '\\') { get_ascii(raw); osc.raw.len++; - break; + return osc; } osc.arg.len++; } - - /* NOTE: if raw->len is 0 we ran out of characters */ - if (raw->len == 0) - osc.cmd = -1; + /* NOTE: if we fell out of the loop then we ran out of characters */ + osc.cmd = -1; return osc; }