From ccc318b2add9b976783b8a29e1dc2b90a8c333cc Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk Date: Sat, 7 Jan 2023 13:55:37 +0100 Subject: [PATCH] Increase the max history size for hel to 10000. --- hel/src/utils.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hel/src/utils.rs b/hel/src/utils.rs index c002648..39a4367 100644 --- a/hel/src/utils.rs +++ b/hel/src/utils.rs @@ -91,6 +91,7 @@ pub mod home { pub mod editor { use crate::structs::LKErr; use rustyline::error::ReadlineError; + use rustyline::config::Configurer; use std::sync::Arc; use parking_lot::Mutex; @@ -103,8 +104,10 @@ pub mod editor { impl Editor { pub fn new() -> EditorRef { + let mut editor = rustyline::Editor::<()>::new().unwrap(); + editor.set_max_history_size(10000); Arc::new(Mutex::new(Self { - editor: rustyline::Editor::<()>::new().unwrap(), + editor: editor, })) }