mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-27 19:31:46 +00:00
Use the byte loader for normal mode
This commit is contained in:
parent
43451b1287
commit
3f41b22011
1 changed files with 7 additions and 2 deletions
|
|
@ -317,8 +317,13 @@ dispatch_normal_mode_byte(PS *self, uint8_t ch) {
|
|||
|
||||
static void
|
||||
consume_normal(PS *self) {
|
||||
uint8_t ch = self->buf[self->read.pos++];
|
||||
dispatch_normal_mode_byte(self, ch);
|
||||
const unsigned sz = self->read.sz - self->read.pos;
|
||||
byte_loader b; byte_loader_init(&b, self->buf + self->read.pos, sz);
|
||||
while (b.num_left && self->vte_state == VTE_NORMAL) {
|
||||
uint8_t ch = byte_loader_next(&b);
|
||||
dispatch_normal_mode_byte(self, ch);
|
||||
}
|
||||
self->read.pos += sz - b.num_left;
|
||||
}
|
||||
// }}}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue