From 82668e39e5f3dcbe13fc95e2bdcb18e6d40e3d88 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Thu, 7 Jan 2016 01:05:18 +0300 Subject: [PATCH] Fix: Now, +key combinations works with non-Latin characters --- iso2022.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/iso2022.c b/iso2022.c index 0613100..483f69d 100644 --- a/iso2022.c +++ b/iso2022.c @@ -353,11 +353,15 @@ copyIn(Iso2022Ptr is, int fd, unsigned char *buf, int count) if (is->parserState == P_ESC) { assert(buffered_input_count == 0); codepoint = *c; - NEXT; - if (*c == CSI_7) + if (*(c + 1) == CSI_7) { is->parserState = P_CSI; - else if (IS_FINAL_ESC(codepoint)) + NEXT; + } else if (IS_FINAL_ESC(codepoint)) { is->parserState = P_NORMAL; + continue; + } else { + NEXT; + } } else if (is->parserState == P_CSI) { assert(buffered_input_count == 0); codepoint = *c; -- 2.4.3