readline.diff

applies cleanly on trunk and Backport93 - Tay Ray Chuan, 06/17/2012 05:23 PM

Download (852 Bytes)

View differences:

ext/readline/readline.c
136 136
{
137 137
    rb_io_t *ifp = 0;
138 138
    VALUE c;
139
    int ch;
139 140
    if (!readline_instream) return rl_getc(input);
140 141
    GetOpenFile(readline_instream, ifp);
141 142
    if (rl_instream != ifp->stdio_file) return rl_getc(input);
......
169 170
#endif
170 171
    c = rb_funcall(readline_instream, id_getbyte, 0, 0);
171 172
    if (NIL_P(c)) return EOF;
172
    return NUM2CHR(c);
173
    ch = NUM2CHR(c);
174
    if (RL_ISSTATE(RL_STATE_ISEARCH)
175
            && ch == ESC
176
	    /* interested in bytes only, actually */
177
	    && rb_io_read_pending(ifp))
178
        rl_execute_next(ESC);
179
    return ch;
173 180
}
174 181
#elif defined HAVE_RL_EVENT_HOOK
175 182
#define BUSY_WAIT 0