We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@sync peek
1 parent 324a439 commit 8b3ce18Copy full SHA for 8b3ce18
Cargo.lock
Cargo.toml
@@ -22,7 +22,7 @@ clap = { version = "4.5.32", features = [ "derive" ] }
22
core-foundation-sys = "0.8.7"
23
crossterm = { version = "0.28.1", features = [ "event-stream" ] }
24
dirs = "6.0.0"
25
-foldhash = "0.1.4"
+foldhash = "0.1.5"
26
futures = "0.3.31"
27
globset = "0.4.16"
28
indexmap = { version = "2.8.0", features = [ "serde" ] }
yazi-config/preset/keymap-default.toml
@@ -30,13 +30,13 @@ keymap = [
30
{ on = "<PageDown>", run = "arrow 100%", desc = "Move cursor down one page" },
31
32
{ on = [ "g", "g" ], run = "arrow top", desc = "Move cursor to the top" },
33
- { on = "G", run = "arrow bot", desc = "Move cursor to the bottom" },
+ { on = "G", run = "arrow bot", desc = "Move cursor to the bottom" },
34
35
# Navigation
36
- { on = "h", run = "leave", desc = "Go back to the parent directory" },
+ { on = "h", run = "leave", desc = "Back to the parent directory" },
37
{ on = "l", run = "enter", desc = "Enter the child directory" },
38
39
- { on = "<Left>", run = "leave", desc = "Go back to the parent directory" },
+ { on = "<Left>", run = "leave", desc = "Back to the parent directory" },
40
{ on = "<Right>", run = "enter", desc = "Enter the child directory" },
41
42
{ on = "H", run = "back", desc = "Back to previous directory" },
yazi-config/preset/yazi-default.toml
@@ -118,7 +118,7 @@ preloaders = [
118
{ mime = "application/ms-opentype", run = "font" },
119
]
120
previewers = [
121
- { name = "*/", run = "folder", sync = true },
+ { name = "*/", run = "folder" },
122
# Code
123
{ mime = "text/*", run = "code" },
124
{ mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" },
yazi-config/src/plugin/previewer.rs
@@ -10,8 +10,6 @@ pub struct Previewer {
10
pub name: Option<Pattern>,
11
pub mime: Option<Pattern>,
12
pub run: Cmd,
13
- #[serde(default)]
14
- pub sync: bool,
15
}
16
17
impl Previewer {
yazi-core/src/tab/preview.rs
@@ -32,11 +32,7 @@ impl Preview {
};
self.abort();
- if previewer.sync {
- isolate::peek_sync(&previewer.run, file, mime, self.skip);
- } else {
- self.previewer_ct = Some(isolate::peek(&previewer.run, file, mime, self.skip));
- }
+ self.previewer_ct = isolate::peek(&previewer.run, file, mime, self.skip);
pub fn go_folder(&mut self, file: File, dir: Option<Cha>, force: bool) {
yazi-fm/src/app/commands/plugin.rs
@@ -29,7 +29,7 @@ impl App {
29
tokio::spawn(async move {
- match LOADER.ensure(&opt.id).await {
+ match LOADER.ensure(&opt.id, |_| ()).await {
Ok(()) => AppProxy::plugin_do(opt),
Err(e) => AppProxy::notify_error("Plugin load failed", e),
yazi-fm/src/term.rs
@@ -35,10 +35,10 @@ impl Term {
execute!(
TTY.writer(),
screen::SetScreen(true),
- Print(Mux::csi("\x1bP$q q\x1b\\")), // Request cursor shape (DECRQSS query for DECSCUSR)
- Print(Mux::csi("\x1b[?12$p")), // Request cursor blink status (DECSET)
- Print("\x1b[?u"), // Request keyboard enhancement flags (CSI u)
- Print(Mux::csi("\x1b[0c")), // Request device attributes
+ Print("\x1bP$q q\x1b\\"), // Request cursor shape (DECRQSS query for DECSCUSR)
+ Print(Mux::csi("\x1b[?12$p")), // Request cursor blink status (DECSET)
+ Print("\x1b[?u"), // Request keyboard enhancement flags (CSI u)
+ Print(Mux::csi("\x1b[0c")), // Request device attributes
screen::SetScreen(false),
43
EnableBracketedPaste,
44
mouse::SetMouse(true),
yazi-plugin/preset/plugins/folder.lua
@@ -1,3 +1,5 @@
1
+--- @sync peek
2
+
3
local M = {}
4
5
function M:peek(job)
yazi-plugin/src/config/runtime.rs
@@ -29,16 +29,11 @@ impl<'a> Runtime<'a> {
fn args(lua: &Lua) -> mlua::Result<Value> {
- Composer::make(lua, 5, |lua, key| {
- match key {
- b"entries" => {
- lua.create_sequence_from(ARGS.entries.iter().map(Url::from))?.into_lua(lua)?
- b"cwd_file" => ARGS.cwd_file.as_ref().map(Url::from).into_lua(lua)?,
- b"chooser_file" => ARGS.chooser_file.as_ref().map(Url::from).into_lua(lua)?,
- _ => return Ok(Value::Nil),
- .into_lua(lua)
+ Composer::make(lua, 5, |lua, key| match key {
+ b"entries" => lua.create_sequence_from(ARGS.entries.iter().map(Url::from))?.into_lua(lua),
+ b"cwd_file" => ARGS.cwd_file.as_ref().map(Url::from).into_lua(lua),
+ b"chooser_file" => ARGS.chooser_file.as_ref().map(Url::from).into_lua(lua),
+ _ => Ok(Value::Nil),
})
0 commit comments