Fix different behaviour between libedit and readline.