Set history size to ${CLING_HISTSIZE}
It was left unset. Then the default hist size was static_cast<size_t>(-1), which is practically equivalent to unlimited history size.
This commit is contained in:
parent
c3dd723262
commit
da57784037
lib/UserInterface/textinput
@ -338,6 +338,16 @@ namespace textinput {
|
||||
[](Display *D) { return D->NotifyWindowChange(); });
|
||||
}
|
||||
|
||||
void TextInput::SetHistoryMaxDepth(size_t maxDepth) const
|
||||
{
|
||||
fContext->GetHistory()->SetMaxDepth(maxDepth);
|
||||
}
|
||||
|
||||
void TextInput::SetHistoryPruneLength(size_t pruneLength) const
|
||||
{
|
||||
fContext->GetHistory()->SetPruneLength(pruneLength);
|
||||
}
|
||||
|
||||
void
|
||||
TextInput::AddHistoryLine(const char* line) {
|
||||
if (!line) return;
|
||||
|
@ -84,6 +84,8 @@ namespace textinput {
|
||||
void ReleaseInputOutput() const;
|
||||
|
||||
// History interface
|
||||
void SetHistoryMaxDepth(size_t maxDepth) const;
|
||||
void SetHistoryPruneLength(size_t pruneLength) const;
|
||||
bool IsAutoHistAddEnabled() const { return fAutoHistAdd; }
|
||||
void EnableAutoHistAdd(bool enable = true) { fAutoHistAdd = enable; }
|
||||
void AddHistoryLine(const char* line);
|
||||
|
Loading…
Reference in New Issue
Block a user