diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-01-11 11:14:18 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-01-11 11:14:18 -0500 |
commit | 21035ea723f2a85328fc1b7b50f9488097346ab4 (patch) | |
tree | b5849c9843a529ceec667bb6ac8de02fd8311f89 /src | |
parent | 6744503cc1cb7bbba54316240c9fe2b971e8b178 (diff) | |
download | nbsh-21035ea723f2a85328fc1b7b50f9488097346ab4.tar.gz nbsh-21035ea723f2a85328fc1b7b50f9488097346ab4.zip |
don't allow an entry to transition from exited back to running
Diffstat (limited to 'src')
-rw-r--r-- | src/shell/history/entry.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shell/history/entry.rs b/src/shell/history/entry.rs index f2a7d08..b20321d 100644 --- a/src/shell/history/entry.rs +++ b/src/shell/history/entry.rs @@ -313,7 +313,9 @@ impl Entry { } pub fn set_span(&mut self, span: (usize, usize)) { - self.state = State::Running(span); + if matches!(self.state, State::Running(_)) { + self.state = State::Running(span); + } } pub async fn finish( |