mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-11 11:09:16 +02:00
...
This commit is contained in:
@@ -88,6 +88,6 @@ find_either_of_two_chars_simple(uint8_t *haystack, const size_t sz, const uint8_
|
||||
#undef SHIFT_OP
|
||||
|
||||
uint8_t*
|
||||
find_either_of_two_chars(uint8_t *haystack, const size_t sz, const uint8_t a, const uint8_t b) {
|
||||
find_either_of_two_bytes(uint8_t *haystack, const size_t sz, const uint8_t a, const uint8_t b) {
|
||||
return find_either_of_two_chars_simple(haystack, sz, a, b);
|
||||
}
|
||||
|
||||
@@ -20,4 +20,4 @@ typedef struct ByteLoader {
|
||||
uint8_t byte_loader_peek(const ByteLoader *self);
|
||||
void byte_loader_init(ByteLoader *self, const uint8_t *buf, unsigned int sz);
|
||||
uint8_t byte_loader_next(ByteLoader *self);
|
||||
uint8_t* find_either_of_two_chars(uint8_t *haystack, const size_t sz, const uint8_t a, const uint8_t b);
|
||||
uint8_t* find_either_of_two_bytes(uint8_t *haystack, const size_t sz, const uint8_t a, const uint8_t b);
|
||||
|
||||
@@ -396,7 +396,7 @@ consume_esc(PS *self) {
|
||||
static bool
|
||||
find_st_terminator(PS *self, size_t *end_pos) {
|
||||
const size_t sz = self->read.sz - self->read.pos;
|
||||
uint8_t *q = find_either_of_two_chars(self->buf + self->read.pos, sz, BEL, ESC_ST);
|
||||
uint8_t *q = find_either_of_two_bytes(self->buf + self->read.pos, sz, BEL, ESC_ST);
|
||||
if (q == NULL) {
|
||||
self->read.pos += sz;
|
||||
return false;
|
||||
@@ -1447,7 +1447,7 @@ consume_input(PS *self) {
|
||||
static bool
|
||||
find_pending_stop_csi(PS *self) {
|
||||
const size_t sz = self->read.sz - self->read.pos;
|
||||
uint8_t *q = find_either_of_two_chars(self->buf + self->read.pos, sz, ESC, 'l');
|
||||
uint8_t *q = find_either_of_two_bytes(self->buf + self->read.pos, sz, ESC, 'l');
|
||||
if (q == NULL) {
|
||||
self->read.pos += sz;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user