summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-19 02:58:40 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-19 02:58:40 +0000
commitd998ba1c3ca32260a111b85ddab1dd1e564b16f7 (patch)
treeb27a60bb6e8f110dbf9e19111fb9ac895c0b1d4c /ext/readline
parentbcc4c40853d0140185f9bc9511beddeb3a33823a (diff)
* ext/readline/readline.c (readline_getc): fix editline compatibility
broken by r36123. [Bug #6601] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/readline')
-rw-r--r--ext/readline/readline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 07c9268..b6b4611 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -174,6 +174,7 @@ readline_getc(FILE *input)
#endif
c = rb_io_getbyte(readline_instream);
if (NIL_P(c)) return EOF;
+#ifdef ESC
if (c == INT2FIX(ESC) &&
RL_ISSTATE(RL_STATE_ISEARCH) && /* isn't needed in other states? */
rb_io_read_pending(ifp)) {
@@ -184,6 +185,7 @@ readline_getc(FILE *input)
if (meta) rl_execute_next(ESC);
return ESC;
}
+#endif
return FIX2INT(c);
}
#elif defined HAVE_RL_EVENT_HOOK