yazi_core/help/commands/
escape.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use yazi_macro::render;
use yazi_shared::event::CmdCow;

use crate::help::Help;

impl Help {
	pub fn escape(&mut self, _: CmdCow) {
		if self.keyword().is_none() {
			return self.toggle(self.layer);
		}

		self.keyword = String::new();
		self.in_filter = None;
		self.filter_apply();
		render!();
	}
}