diff -ruN readline-8.3.orig/input.c readline-8.3/input.c --- readline-8.3.orig/input.c 2025-05-02 15:29:05.000000000 +0200 +++ readline-8.3/input.c 2025-12-24 09:42:16.297387295 +0100 @@ -261,13 +261,16 @@ input = 0; tty = fileno (rl_instream); - /* Move this up here to give it first shot, but it can't set chars_avail */ + /* Move this up here to give it first shot, but it can't set chars_avail, + so we assume a single character is available. */ /* XXX - need rl_chars_available_hook? */ if (rl_input_available_hook) { result = (*rl_input_available_hook) (); if (result == 0) result = -1; + else + chars_avail = 1; } #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) @@ -285,6 +288,7 @@ #endif if (result <= 0) return 0; /* Nothing to read. */ + result = -1; /* there is something, so check how many chars below */ } #endif diff -ruN readline-8.3.orig/patchlevel readline-8.3/patchlevel --- readline-8.3.orig/patchlevel 2020-05-21 20:22:40.000000000 +0200 +++ readline-8.3/patchlevel 2025-12-24 09:42:16.297387295 +0100 @@ -1,3 +1,3 @@ # Do not edit -- exists only for use by patch -0 +1 .