From 217453780ee92da771c8347c5396986a9c550d66 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 8 Apr 2021 01:06:38 -0400 Subject: [PATCH] [terminfo] remove alacritty hacks #1506 #1430 --- src/lib/terminfo.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/lib/terminfo.c b/src/lib/terminfo.c index 288bd1e13..02039edc4 100644 --- a/src/lib/terminfo.c +++ b/src/lib/terminfo.c @@ -330,12 +330,9 @@ query_sixel(tinfo* ti, int fd){ WANT_QMARK, WANT_SEMI, WANT_C, - WANT_C_ALACRITTY_HACK, DONE } state = WANT_CSI; - // we're looking for a 4 following a semicolon, or alacritty's insistence - // on CSI 6c followed by XTSMGRAPHICS, which probably breaks us on a real - // VT102, but how many of them could there be? le sigh FIXME + // we're looking for a 4 following a semicolon while(state != DONE && read(fd, &in, 1) == 1){ switch(state){ case WANT_CSI: @@ -353,8 +350,6 @@ query_sixel(tinfo* ti, int fd){ state = WANT_C; }else if(in == 'c'){ state = DONE; - }else if(in == '6'){ - state = WANT_C_ALACRITTY_HACK; } break; case WANT_C: @@ -365,20 +360,14 @@ query_sixel(tinfo* ti, int fd){ state = DONE; } break; - case WANT_C_ALACRITTY_HACK: - if(in == 'c'){ - setup_sixel(ti); - state = DONE; - // alacritty doesn't want further querying - return 0; - } - break; case DONE: default: break; } } - query_sixel_details(ti, fd); + if(ti->sixel_supported){ + query_sixel_details(ti, fd); + } return 0; }