From fe395ea24be28d6d8adf284ac2610b33200518eb Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Thu, 12 Dec 2024 13:16:48 +0100 Subject: [PATCH 1/2] jline history: keep entire history (10k entries) in memory default is only 500... --- core/src/main/scala/replpp/JLineTerminal.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/scala/replpp/JLineTerminal.scala b/core/src/main/scala/replpp/JLineTerminal.scala index 43d8843..4d6e5cd 100644 --- a/core/src/main/scala/replpp/JLineTerminal.scala +++ b/core/src/main/scala/replpp/JLineTerminal.scala @@ -92,6 +92,7 @@ class JLineTerminal extends java.io.Closeable { .highlighter(new Highlighter) .parser(new Parser) .variable(HISTORY_FILE, s"$userHome/.dotty_history") // Save history to file + .variable(HISTORY_SIZE, 10000) // keep entire history file in memory - default is only 500... see DefaultHistory.DEFAULT_HISTORY_SIZE .variable(SECONDARY_PROMPT_PATTERN, "%M") // A short word explaining what is "missing", // this is supplied from the EOFError.getMissing() method .variable(LIST_MAX, 400) // Ask user when number of completions exceed this limit (default is 100). From 8f94d65ea94c8805e0587fd2ec665cfa6a68c74e Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Thu, 12 Dec 2024 14:21:04 +0100 Subject: [PATCH 2/2] comment --- core/src/main/scala/replpp/JLineTerminal.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/replpp/JLineTerminal.scala b/core/src/main/scala/replpp/JLineTerminal.scala index 4d6e5cd..459ed6a 100644 --- a/core/src/main/scala/replpp/JLineTerminal.scala +++ b/core/src/main/scala/replpp/JLineTerminal.scala @@ -92,7 +92,7 @@ class JLineTerminal extends java.io.Closeable { .highlighter(new Highlighter) .parser(new Parser) .variable(HISTORY_FILE, s"$userHome/.dotty_history") // Save history to file - .variable(HISTORY_SIZE, 10000) // keep entire history file in memory - default is only 500... see DefaultHistory.DEFAULT_HISTORY_SIZE + .variable(HISTORY_SIZE, 10000) // MP: adapted here; keep entire history file in memory - default is only 500... see DefaultHistory.DEFAULT_HISTORY_SIZE .variable(SECONDARY_PROMPT_PATTERN, "%M") // A short word explaining what is "missing", // this is supplied from the EOFError.getMissing() method .variable(LIST_MAX, 400) // Ask user when number of completions exceed this limit (default is 100).