repl-interacter: save history after entering every line

Fixes: lix-project/lix#328
Change-Id: Iedd79ff5f72e84766ebd234c63856170afc624f0
This commit is contained in:
puck 2024-05-19 14:16:11 +00:00
parent 93b7edfd07
commit 73ef8cd50a

View file

@ -175,6 +175,8 @@ bool ReadlineLikeInteracter::getLine(std::string & input, ReplPromptType promptT
if (!s) if (!s)
return false; return false;
write_history(historyFile.c_str());
input += s; input += s;
input += '\n'; input += '\n';
return true; return true;