commit c9c51d5: [Minor] Try to add workaround for replxx usage with no history

Vsevolod Stakhov vsevolod at rspamd.com
Mon Jun 13 22:49:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-06-13 23:41:22 +0100
URL: https://github.com/rspamd/rspamd/commit/c9c51d50a53f8286bbbe3306e02b78f6a7c2b94c (HEAD -> master)

[Minor] Try to add workaround for replxx usage with no history
Issue: #4133

---
 src/lua/lua_util.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index 742c6377a..8f53e377d 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -2469,6 +2469,8 @@ lua_util_readline (lua_State *L)
 
 	if (rx_instance == NULL) {
 		rx_instance = replxx_init ();
+		/* See https://github.com/AmokHuginnsson/replxx/issues/137 */
+		replxx_history_add(rx_instance, "");
 	}
 
 	input = (gchar *)replxx_input (rx_instance, prompt);


More information about the Commits mailing list