mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-24 00:01:03 +00:00
chore: bump version to 0.2.3
This commit is contained in:
parent
fab5bc16cc
commit
0d7e977076
14 changed files with 104 additions and 70 deletions
35
Cargo.lock
generated
35
Cargo.lock
generated
|
|
@ -1960,6 +1960,26 @@ dependencies = [
|
|||
"weezl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tikv-jemalloc-sys"
|
||||
version = "0.5.4+5.3.0-patched"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tikv-jemallocator"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"tikv-jemalloc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.34"
|
||||
|
|
@ -2652,7 +2672,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-adaptor"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
|
@ -2671,7 +2691,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-config"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
|
@ -2696,7 +2716,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-core"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64",
|
||||
|
|
@ -2725,7 +2745,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-fm"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"better-panic",
|
||||
|
|
@ -2737,6 +2757,7 @@ dependencies = [
|
|||
"ratatui",
|
||||
"signal-hook-tokio",
|
||||
"syntect",
|
||||
"tikv-jemallocator",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
|
|
@ -2753,7 +2774,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-plugin"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"ansi-to-tui",
|
||||
"anyhow",
|
||||
|
|
@ -2788,7 +2809,7 @@ checksum = "f4b6c8e12e39ac0f79fa96f36e5b88e0da8d230691abd729eec709b43c74f632"
|
|||
|
||||
[[package]]
|
||||
name = "yazi-scheduler"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-priority-channel",
|
||||
|
|
@ -2809,7 +2830,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-shared"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.4.2",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-adaptor"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,8 +9,8 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.2" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.2" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.3" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.3" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "^1"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-config"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,7 +9,7 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.2" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.3" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "^1"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-core"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,11 +9,11 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.2" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.2" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.2" }
|
||||
yazi-scheduler = { path = "../yazi-scheduler", version = "0.2.2" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.2" }
|
||||
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.3" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.3" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.3" }
|
||||
yazi-scheduler = { path = "../yazi-scheduler", version = "0.2.3" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.3" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "^1"
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ impl Files {
|
|||
}
|
||||
|
||||
macro_rules! go {
|
||||
($dist:expr, $src:expr) => {
|
||||
($dist:expr, $src:expr, $inc:literal) => {
|
||||
let mut todo: BTreeMap<_, _> = $src.into_iter().map(|f| (f.url(), f)).collect();
|
||||
for f in &$dist {
|
||||
if todo.remove(&f.url).is_some() && todo.is_empty() {
|
||||
|
|
@ -216,7 +216,7 @@ impl Files {
|
|||
}
|
||||
}
|
||||
if !todo.is_empty() {
|
||||
self.revision += 1;
|
||||
self.revision += $inc;
|
||||
$dist.extend(todo.into_values());
|
||||
}
|
||||
};
|
||||
|
|
@ -224,10 +224,10 @@ impl Files {
|
|||
|
||||
let (hidden, items) = self.split_files(files);
|
||||
if !items.is_empty() {
|
||||
go!(self.items, items);
|
||||
go!(self.items, items, 1);
|
||||
}
|
||||
if !hidden.is_empty() {
|
||||
go!(self.hidden, hidden);
|
||||
go!(self.hidden, hidden, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -238,13 +238,13 @@ impl Files {
|
|||
}
|
||||
|
||||
macro_rules! go {
|
||||
($dist:expr, $src:expr) => {
|
||||
($dist:expr, $src:expr, $inc:literal) => {
|
||||
let mut todo: BTreeSet<_> = $src.into_iter().collect();
|
||||
let len = $dist.len();
|
||||
|
||||
$dist.retain(|f| !todo.remove(&f.url));
|
||||
if $dist.len() != len {
|
||||
self.revision += 1;
|
||||
self.revision += $inc;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -260,32 +260,32 @@ impl Files {
|
|||
};
|
||||
|
||||
if !items.is_empty() {
|
||||
go!(self.items, items);
|
||||
go!(self.items, items, 1);
|
||||
}
|
||||
if !hidden.is_empty() {
|
||||
go!(self.hidden, hidden);
|
||||
go!(self.hidden, hidden, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn update_deleting(&mut self, urls: Vec<Url>) {
|
||||
macro_rules! go {
|
||||
($dist:expr, $src:expr) => {
|
||||
($dist:expr, $src:expr, $inc:literal) => {
|
||||
let len = $dist.len();
|
||||
|
||||
$dist.retain(|f| !$src.remove(&f.url));
|
||||
if $dist.len() != len {
|
||||
self.revision += 1;
|
||||
self.revision += $inc;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let mut urls: BTreeSet<_> = urls.into_iter().collect();
|
||||
if !urls.is_empty() {
|
||||
go!(self.items, urls);
|
||||
go!(self.items, urls, 1);
|
||||
}
|
||||
if !urls.is_empty() {
|
||||
go!(self.hidden, urls);
|
||||
go!(self.hidden, urls, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -298,7 +298,7 @@ impl Files {
|
|||
}
|
||||
|
||||
macro_rules! go {
|
||||
($dist:expr, $src:expr) => {
|
||||
($dist:expr, $src:expr, $inc:literal) => {
|
||||
let len = $src.len();
|
||||
for i in 0..$dist.len() {
|
||||
if let Some(f) = $src.remove(&$dist[i].url) {
|
||||
|
|
@ -309,7 +309,7 @@ impl Files {
|
|||
}
|
||||
}
|
||||
if $src.len() != len {
|
||||
self.revision += 1;
|
||||
self.revision += $inc;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -326,10 +326,10 @@ impl Files {
|
|||
};
|
||||
|
||||
if !items.is_empty() {
|
||||
go!(self.items, items);
|
||||
go!(self.items, items, 1);
|
||||
}
|
||||
if !hidden.is_empty() {
|
||||
go!(self.hidden, hidden);
|
||||
go!(self.hidden, hidden, 0);
|
||||
}
|
||||
(hidden, items)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,13 +31,17 @@ impl Manager {
|
|||
}
|
||||
|
||||
pub fn peek(&mut self, opt: impl Into<Opt>) {
|
||||
let Some(hovered) = self.hovered() else {
|
||||
let Some(hovered) = self.hovered().cloned() else {
|
||||
return render!(self.active_mut().preview.reset());
|
||||
};
|
||||
|
||||
let hovered = hovered.clone();
|
||||
let folder = Some(())
|
||||
.filter(|_| hovered.is_dir())
|
||||
.and_then(|_| self.active().history.get(&hovered.url))
|
||||
.map(|f| (f.offset, f.mtime));
|
||||
|
||||
if !self.active().preview.same_url(&hovered.url) {
|
||||
self.active_mut().preview.skip = 0;
|
||||
self.active_mut().preview.skip = folder.map(|f| f.0).unwrap_or_default();
|
||||
render!(self.active_mut().preview.reset());
|
||||
}
|
||||
|
||||
|
|
@ -56,13 +60,12 @@ impl Manager {
|
|||
}
|
||||
|
||||
if hovered.is_dir() {
|
||||
let mtime = self.active().history.get(&hovered.url).and_then(|f| f.mtime);
|
||||
self.active_mut().preview.go_folder(hovered, mtime, opt.force);
|
||||
self.active_mut().preview.go_folder(hovered, folder.and_then(|f| f.1), opt.force);
|
||||
return;
|
||||
}
|
||||
|
||||
if let Some(m) = self.mimetype.get(&hovered.url).cloned() {
|
||||
self.active_mut().preview.go(hovered, &m, opt.force);
|
||||
if let Some(mime) = self.mimetype.get(&hovered.url).cloned() {
|
||||
self.active_mut().preview.go(hovered, &mime, opt.force);
|
||||
} else {
|
||||
render!(self.active_mut().preview.reset());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ impl Manager {
|
|||
}
|
||||
|
||||
let file = File::from(new.clone()).await?;
|
||||
FilesOp::Deleting(file.parent().unwrap(), vec![new.clone()]).emit();
|
||||
FilesOp::Upserting(file.parent().unwrap(), BTreeMap::from_iter([(old, file)])).emit();
|
||||
Ok(Self::_hover(Some(new)))
|
||||
}
|
||||
|
|
@ -160,7 +161,7 @@ impl Manager {
|
|||
}
|
||||
|
||||
let mut buf = [0; 10];
|
||||
stdin().read(&mut buf).await.ok();
|
||||
_ = stdin().read(&mut buf).await?;
|
||||
if buf[0] != b'y' && buf[0] != b'Y' {
|
||||
return Ok(());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ impl Tasks {
|
|||
enable_raw_mode().ok();
|
||||
|
||||
let mut stdin = stdin();
|
||||
let mut quit = [0; 10];
|
||||
let mut answer = 0;
|
||||
loop {
|
||||
select! {
|
||||
Some(line) = rx.recv() => {
|
||||
|
|
@ -51,8 +51,9 @@ impl Tasks {
|
|||
break;
|
||||
}
|
||||
},
|
||||
Ok(_) = stdin.read(&mut quit) => {
|
||||
if quit[0] == b'q' {
|
||||
result = stdin.read_u8() => {
|
||||
answer = result.unwrap_or(b'q');
|
||||
if answer == b'q' {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -62,8 +63,8 @@ impl Tasks {
|
|||
if let Some(task) = scheduler.running.lock().get_mut(id) {
|
||||
task.logger = None;
|
||||
}
|
||||
while quit[0] != b'q' {
|
||||
stdin.read(&mut quit).await.ok();
|
||||
while answer != b'q' {
|
||||
answer = stdin.read_u8().await.unwrap_or(b'q');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-fm"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,12 +9,12 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.2" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.2" }
|
||||
yazi-core = { path = "../yazi-core", version = "0.2.2" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.2" }
|
||||
yazi-scheduler = { path = "../yazi-scheduler", version = "0.2.2" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.2" }
|
||||
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.3" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.3" }
|
||||
yazi-core = { path = "../yazi-core", version = "0.2.3" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.3" }
|
||||
yazi-scheduler = { path = "../yazi-scheduler", version = "0.2.3" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.3" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "^1"
|
||||
|
|
@ -37,6 +37,7 @@ tracing-subscriber = "^0"
|
|||
[target."cfg(unix)".dependencies]
|
||||
libc = "^0"
|
||||
signal-hook-tokio = { version = "^0", features = [ "futures-v0_3" ] }
|
||||
tikv-jemallocator = "^0"
|
||||
|
||||
[[bin]]
|
||||
name = "yazi"
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ impl<'a, 'b> Folder<'a, 'b> {
|
|||
Ok(if !cx.manager.active().mode.is_visual() {
|
||||
selected
|
||||
} else {
|
||||
let idx: usize = me.named_user_value("idx")?;
|
||||
cx.manager.active().mode.pending(folder.offset + idx, selected)
|
||||
let pos: isize = me.named_user_value("pos")?;
|
||||
cx.manager.active().mode.pending((folder.offset as isize + pos) as usize, selected)
|
||||
})
|
||||
});
|
||||
reg.add_function("found", |lua, me: AnyUserData| {
|
||||
|
|
@ -171,21 +171,24 @@ impl<'a, 'b> Folder<'a, 'b> {
|
|||
.skip(window.0)
|
||||
.take(window.1)
|
||||
.enumerate()
|
||||
.filter_map(|(i, f)| self.file(i, f).ok())
|
||||
.filter_map(|(i, f)| self.file(i as isize, f).ok())
|
||||
.collect::<Vec<_>>(),
|
||||
)?;
|
||||
ud.set_named_user_value("files", self.scope.create_any_userdata_ref(&self.inner.files)?)?;
|
||||
ud.set_named_user_value(
|
||||
"hovered",
|
||||
self.inner.hovered().and_then(|h| self.file(self.inner.cursor - window.0, h).ok()),
|
||||
self
|
||||
.inner
|
||||
.hovered()
|
||||
.and_then(|h| self.file(self.inner.cursor as isize - window.0 as isize, h).ok()),
|
||||
)?;
|
||||
|
||||
Ok(ud)
|
||||
}
|
||||
|
||||
fn file(&self, idx: usize, inner: &'a yazi_shared::fs::File) -> mlua::Result<AnyUserData<'a>> {
|
||||
fn file(&self, pos: isize, inner: &'a yazi_shared::fs::File) -> mlua::Result<AnyUserData<'a>> {
|
||||
let ud = self.scope.create_any_userdata_ref(inner)?;
|
||||
ud.set_named_user_value("idx", idx)?;
|
||||
ud.set_named_user_value("pos", pos)?;
|
||||
ud.set_named_user_value("folder", self.scope.create_any_userdata_ref(self.inner)?)?;
|
||||
|
||||
Ok(ud)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
#![allow(clippy::module_inception)]
|
||||
#![allow(clippy::unit_arg)]
|
||||
|
||||
#[cfg(unix)]
|
||||
#[global_allocator]
|
||||
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||
|
||||
mod app;
|
||||
mod completion;
|
||||
mod components;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-plugin"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,9 +9,9 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.2" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.2" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.2" }
|
||||
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.3" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.3" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.3" }
|
||||
|
||||
# External dependencies
|
||||
ansi-to-tui = "^3"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-scheduler"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,10 +9,10 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.2" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.2" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.2" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.2" }
|
||||
yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.3" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.3" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.3" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.3" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "^1"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-shared"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue