fix(history): only enable if not obscured

This commit is contained in:
OliverGuy 2026-05-07 00:54:16 +02:00
parent 5d5b4334c7
commit 340e4f7cd6
2 changed files with 4 additions and 2 deletions

View file

@ -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));

View file

@ -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!();
}