macos clear_history workaround
@@ -48,6 +48,9 @@ tb_int_t xm_readline_clear_history(lua_State* lua)
// call clear_history (will crash on macOS)
#ifndef TB_CONFIG_OS_MACOSX
clear_history();
+#else
+ for (tb_int_t i = history_length - 1; i >= 0; --i)
+ remove_history(i);
#endif
// ok
