From 04e8aa31fecfbc2838dd93f3252d74a7f2aab32e Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Fri, 17 Jul 2020 22:26:32 -0500 Subject: [PATCH] update history max size with two different calls. (#2202) Closes #2193 --- crates/nu-cli/src/cli.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/nu-cli/src/cli.rs b/crates/nu-cli/src/cli.rs index 4e06cd69be..d770aa7e66 100644 --- a/crates/nu-cli/src/cli.rs +++ b/crates/nu-cli/src/cli.rs @@ -644,7 +644,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); + // 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")