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