Revert "hopefully the final fix for history (#2222)" (#2235)

This reverts commit 6829ad7a30.
This commit is contained in:
Joseph T. Lyons 2020-07-21 02:19:04 -04:00 committed by GitHub
parent 32b875ada9
commit a36d2a1586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -555,6 +555,9 @@ pub async fn cli(
let _ = ansi_term::enable_ansi_support();
}
// we are ok if history does not exist
let _ = rl.load_history(&History::path());
#[cfg(feature = "ctrlc")]
{
let cc = context.ctrl_c.clone();
@ -642,12 +645,9 @@ pub async fn cli(
.map(|i| i.value.expect_int())
.unwrap_or(100_000);
rl.set_max_history_size(max_history_size as usize);
// rustyline::config::Configurer::set_max_history_size(&mut rl, max_history_size as usize);
// rustyline::Editor::set_max_history_size(&mut rl, max_history_size as usize);
// we are ok if history does not exist
let _ = rl.load_history(&History::path());
// rl.set_max_history_size(max_history_size as usize);
rustyline::config::Configurer::set_max_history_size(&mut rl, max_history_size as usize);
rustyline::Editor::set_max_history_size(&mut rl, max_history_size as usize);
let key_timeout = config
.get("key_timeout")