about summary refs log tree commit diff stats
path: root/src/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua.c')
-rw-r--r--src/lua.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lua.c b/src/lua.c
index 1f2953f..59be9de 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -179,7 +179,9 @@ static int pushline (lua_State *L, int firstline) {
   char *b = buffer;
   size_t l;
   const char *prmt = get_prompt(L, firstline);
-  if (lua_readline(L, b, prmt) == 0)
+  fputs(prmt, stdout);
+  fflush(stdout);
+  if (fgets(buffer, LUA_MAXINPUT, stdin) == NULL)
     return 0;  /* no input */
   l = strlen(b);
   if (l > 0 && b[l-1] == '\n')  /* line ends with newline? */