diff options
| -rw-r--r-- | core/src/xmake/readline/clear_history.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/xmake/readline/clear_history.c b/core/src/xmake/readline/clear_history.c index 6b79bb8d0..ba6bcc823 100644 --- a/core/src/xmake/readline/clear_history.c +++ b/core/src/xmake/readline/clear_history.c @@ -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 |
