feat: new ind-which-show DDS event to change the which component behavior (#3608)

This commit is contained in:
三咲雅 misaki masa 2026-01-25 03:06:50 +08:00 committed by GitHub
parent afc694c122
commit face6aed40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 216 additions and 321 deletions

View file

@ -1,6 +1,7 @@
use anyhow::Result;
use yazi_actor::Ctx;
use yazi_config::{KEYMAP, keymap::{Chord, ChordCow, Key}};
use yazi_macro::emit;
use yazi_macro::{act, emit};
use yazi_shared::Layer;
use crate::app::App;
@ -41,7 +42,8 @@ impl<'a> Router<'a> {
}
if on.len() > 1 {
self.app.core.which.show_with(key, layer);
let cx = &mut Ctx::active(&mut self.app.core);
act!(which:show, cx, (layer, key)).ok();
} else {
emit!(Seq(ChordCow::from(chord).into_seq()));
}