mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 14:36:16 +02:00
NixRepl::mainLoop: restore old curRepl on function exit
This fixes completion callbacks after entering and leaving a nested debugger.
This commit is contained in:
parent
306e5c5ce5
commit
5bb6e3bfaf
1 changed files with 2 additions and 0 deletions
|
@ -252,7 +252,9 @@ void NixRepl::mainLoop()
|
|||
el_hist_size = 1000;
|
||||
#endif
|
||||
read_history(historyFile.c_str());
|
||||
auto oldRepl = curRepl;
|
||||
curRepl = this;
|
||||
Finally restoreRepl([&] { curRepl = oldRepl; });
|
||||
#ifndef READLINE
|
||||
rl_set_complete_func(completionCallback);
|
||||
rl_set_list_possib_func(listPossibleCallback);
|
||||
|
|
Loading…
Reference in a new issue