mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
fix(history): only enable if not obscured
This commit is contained in:
parent
5d5b4334c7
commit
340e4f7cd6
2 changed files with 4 additions and 2 deletions
|
|
@ -21,7 +21,9 @@ impl Actor for Close {
|
|||
if let Some(tx) = input.tx.take() {
|
||||
let value = input.snap().value.clone();
|
||||
if form.submit {
|
||||
yazi_widgets::input::INPUT_HISTORY.lock().unwrap().push(value.clone());
|
||||
if !input.obscure {
|
||||
yazi_widgets::input::INPUT_HISTORY.lock().unwrap().push(value.clone());
|
||||
}
|
||||
_ = tx.send(InputEvent::Submit(value));
|
||||
} else {
|
||||
_ = tx.send(InputEvent::Cancel(value));
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use crate::input::{INPUT_HISTORY, Input, InputOp, parser::HistoryOpt};
|
|||
|
||||
impl Input {
|
||||
pub fn history(&mut self, opt: HistoryOpt) -> Result<Data> {
|
||||
if self.snap().op != InputOp::None {
|
||||
if self.snap().op != InputOp::None || self.obscure {
|
||||
succ!();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue