Fixed a minor bug

pull/2/head
Mark 2023-03-25 10:35:43 -07:00
parent 3fe51ffaed
commit 8edfb70fb8
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,10 @@ impl PromptBuffer {
self.buffer_changed = false; self.buffer_changed = false;
if s != "" { self.hist.push_back(s.clone()); } if s != "" { self.hist.push_back(s.clone()); }
while self.hist.len() > self.hist_maxlen {
self.hist.pop_front();
}
return s; return s;
} }