mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 00:08:04 +02:00
Ignore input_delay when the input buffer is close to full
This commit is contained in:
@@ -867,7 +867,7 @@ Delay before input from the program running in the terminal is processed (in
|
||||
milliseconds). Note that decreasing it will increase responsiveness, but also
|
||||
increase CPU usage and might cause flicker in full screen programs that redraw
|
||||
the entire screen on each loop, because kitty is so fast that partial screen
|
||||
updates will be drawn.
|
||||
updates will be drawn. This setting is ignored when the input buffer is almost full.
|
||||
'''
|
||||
)
|
||||
|
||||
|
||||
@@ -1611,7 +1611,7 @@ run_worker(void *p, ParseData *pd, bool flush) {
|
||||
if (self->read.consumed < self->read.sz) {
|
||||
self->dump_callback = pd->dump_callback; self->now = pd->now;
|
||||
pd->time_since_new_input = pd->now - self->new_input_at;
|
||||
if (flush || pd->time_since_new_input >= OPT(input_delay)) {
|
||||
if (flush || pd->time_since_new_input >= OPT(input_delay) || (BUF_SZ - self->read.sz) <= 16 * 1024) {
|
||||
bool buf_full = self->read.sz >= BUF_SZ;
|
||||
pd->input_read = true;
|
||||
do_parse_vt(self);
|
||||
|
||||
Reference in New Issue
Block a user