From 0049b326706c07525d0e6ac2e60a028e7a92f490 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 29 Mar 2023 10:01:05 -0700 Subject: [PATCH] Fixed cursor overflow --- src/promptbuffer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/promptbuffer.rs b/src/promptbuffer.rs index eeddfeb..c38bef5 100644 --- a/src/promptbuffer.rs +++ b/src/promptbuffer.rs @@ -84,6 +84,7 @@ impl PromptBuffer { let s = String::from(self.buffer.trim()); self.buffer.clear(); self.hist_cursor = 0; + self.cursor = 0; self.buffer_changed = false; if s != "" { self.hist.push_back(s.clone()); }