[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Readline-8.2-beta available
From: |
Chet Ramey |
Subject: |
Re: Readline-8.2-beta available |
Date: |
Fri, 29 Apr 2022 12:07:14 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 |
On 4/26/22 9:22 AM, Andrew Burgess wrote:
Here's a strawman patch:
## START ##
diff --git a/callback.c b/callback.c
index 1a3235f..a7b0b0b 100644
--- a/callback.c
+++ b/callback.c
@@ -279,7 +279,7 @@ rl_callback_read_char (void)
}
/* Make sure application hooks can see whether we saw EOF. */
- if (rl_eof_found = eof)
+ if (rl_eof_found = (rl_done && eof))
RL_SETSTATE(RL_STATE_EOF);
I think something like this works better:
@@ -279,8 +279,11 @@
}
/* Make sure application hooks can see whether we saw EOF. */
- if (rl_eof_found = eof)
- RL_SETSTATE(RL_STATE_EOF);
+ if (eof > 0)
+ {
+ rl_eof_found = eof;
+ RL_SETSTATE(RL_STATE_EOF);
+ }
if (rl_done)
{
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/