diff options
| author | ruki <[email protected]> | 2017-05-11 08:45:41 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-05-11 08:45:41 +0800 |
| commit | abf45462b78f7f483e41fecf37593e718643a420 (patch) | |
| tree | 0899e01a931f45738cc9f8a9915bcea5907fdef8 | |
| parent | 18cc92064b4331e3d4fb5ca63ef3723b955d4448 (diff) | |
| parent | 05590ed02faa985c7b358d4c10126db549e50a77 (diff) | |
Merge pull request #85 from TitanSnow/replhistory
macos clear_history workaround
| -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 |
