Check FIONREAD for all panes not just piped panes, fixes issues with

tests, GitHub issue 4807.
This commit is contained in:
nicm
2026-05-12 09:37:25 +00:00
parent 27a00d1bfd
commit 9e3653a612
3 changed files with 6 additions and 8 deletions

View File

@@ -175,7 +175,7 @@ utf8_should_combine(const struct utf8_data *with, const struct utf8_data *add)
return (1);
break;
}
return 0;
return (0);
}
static enum hanguljamo_subclass

2
utf8.c
View File

@@ -590,7 +590,7 @@ utf8_towc(const struct utf8_data *ud, wchar_t *wc)
case 0:
return (UTF8_ERROR);
}
log_debug("UTF-8 %.*s is %05X", (int)ud->size, ud->data, (u_int)*wc);
log_debug("UTF-8 %.*s is U+%06X", (int)ud->size, ud->data, (u_int)*wc);
return (UTF8_DONE);
}

View File

@@ -376,12 +376,10 @@ window_pane_destroy_ready(struct window_pane *wp)
{
int n;
if (wp->pipe_fd != -1) {
if (EVBUFFER_LENGTH(wp->pipe_event->output) != 0)
return (0);
if (ioctl(wp->fd, FIONREAD, &n) != -1 && n > 0)
return (0);
}
if (wp->pipe_fd != -1 && EVBUFFER_LENGTH(wp->pipe_event->output) != 0)
return (0);
if (ioctl(wp->fd, FIONREAD, &n) != -1 && n > 0)
return (0);
if (~wp->flags & PANE_EXITED)
return (0);