mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 21:53:09 +08:00
Revert "Revert "Don't service ioport completions if data is available on stdin""
This reverts commit 005e6f2ab8
.
This allows new text entry to take priority over highlighting, improving the
performance of pasting.
This commit is contained in:
parent
89fb408eb6
commit
27e4d1d62d
|
@ -104,13 +104,6 @@ char_event_t input_event_queue_t::readb() {
|
|||
}
|
||||
}
|
||||
|
||||
if (ioport > 0 && FD_ISSET(ioport, &fdset)) {
|
||||
iothread_service_completion();
|
||||
if (auto mc = pop_discard_timeouts()) {
|
||||
return *mc;
|
||||
}
|
||||
}
|
||||
|
||||
if (FD_ISSET(STDIN_FILENO, &fdset)) {
|
||||
unsigned char arr[1];
|
||||
if (read_blocked(0, arr, 1) != 1) {
|
||||
|
@ -121,6 +114,15 @@ char_event_t input_event_queue_t::readb() {
|
|||
// We read from stdin, so don't loop.
|
||||
return arr[0];
|
||||
}
|
||||
|
||||
// Check for iothread completions only if there is no data to be read from the stdin.
|
||||
// This gives priority to the foreground.
|
||||
if (ioport > 0 && FD_ISSET(ioport, &fdset)) {
|
||||
iothread_service_completion();
|
||||
if (auto mc = pop_discard_timeouts()) {
|
||||
return *mc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user