about summary refs log tree commit diff stats
path: root/src/lua.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-10-22 20:36:10 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-10-22 20:37:56 -0700
commitd92a484b915e8c5b6248bc553d9906dc1f6de2d0 (patch)
tree3b9d9375dd7d12c5484eef95cd637e675650f5f0 /src/lua.c
parent9eb951608b3da86dd5d4cc81a799dcbd78f98736 (diff)
downloadteliva-d92a484b915e8c5b6248bc553d9906dc1f6de2d0.tar.gz
kill lua_readline abstraction
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? */