Do not exit readline prompt early if it's in a subcommand of some sort

master
Andrzej Rybczak 9 years ago
parent c3b996c0e8
commit f1d9c24938
  1. 5
      src/curses/window.cpp

@ -54,7 +54,10 @@ int read_key(FILE *)
x = w->getX();
if (w->runPromptHook(rl_line_buffer, &done))
{
if (done)
// Do not end if readline is in one of its commands, e.g. searching
// through history, as it doesn't actually make readline exit and it
// becomes stuck in a loop.
if (!RL_ISSTATE(RL_STATE_DISPATCHING) && done)
{
rl_done = 1;
return EOF;

Loading…
Cancel
Save