From 876419a6c488142f421b80dc2852b4ac482958df Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sat, 13 Jan 2024 21:13:23 +0800 Subject: [PATCH] chore: bump version to 0.2.0 --- scripts/bump.sh | 2 +- yazi-adaptor/Cargo.toml | 6 +++--- yazi-adaptor/src/adaptor.rs | 3 +++ yazi-config/Cargo.toml | 4 ++-- yazi-core/Cargo.toml | 12 ++++++------ yazi-fm/Cargo.toml | 14 +++++++------- yazi-fm/src/widgets/clear.rs | 3 +-- yazi-plugin/Cargo.toml | 8 ++++---- yazi-plugin/preset/components/folder.lua | 2 +- yazi-scheduler/Cargo.toml | 10 +++++----- yazi-shared/Cargo.toml | 2 +- 11 files changed, 34 insertions(+), 32 deletions(-) diff --git a/scripts/bump.sh b/scripts/bump.sh index a7a60a9e..7dd2c8f9 100755 --- a/scripts/bump.sh +++ b/scripts/bump.sh @@ -7,5 +7,5 @@ cd $SCRIPT_DIR/.. echo "Bumping version: $1" TOML_FILES="$(git ls-files '*Cargo.toml')" -perl -pi -e "s/^version = .*\$/version = \"$1\"/" $TOML_FILES +perl -pi -e "s/^version .*= .*\$/version = \"$1\"/" $TOML_FILES perl -pi -e "s/^(yazi-[a-z]+)\\s*=\\s*{.*\$/\\1 = { path = \"..\/\\1\", version = \"$1\" }/" $TOML_FILES diff --git a/yazi-adaptor/Cargo.toml b/yazi-adaptor/Cargo.toml index 169956d9..43f33131 100644 --- a/yazi-adaptor/Cargo.toml +++ b/yazi-adaptor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yazi-adaptor" -version = "0.1.5" +version = "0.2.0" edition = "2021" license = "MIT" authors = [ "sxyazi " ] @@ -9,8 +9,8 @@ homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" [dependencies] -yazi-config = { path = "../yazi-config", version = "0.1.5" } -yazi-shared = { path = "../yazi-shared", version = "0.1.5" } +yazi-config = { path = "../yazi-config", version = "0.2.0" } +yazi-shared = { path = "../yazi-shared", version = "0.2.0" } # External dependencies anyhow = "^1" diff --git a/yazi-adaptor/src/adaptor.rs b/yazi-adaptor/src/adaptor.rs index a4668ddf..c885ee53 100644 --- a/yazi-adaptor/src/adaptor.rs +++ b/yazi-adaptor/src/adaptor.rs @@ -188,6 +188,9 @@ impl Adaptor { } } + #[inline] + pub fn shown_load(self) -> Option { SHOWN.load_full().map(|r| *r) } + #[inline] pub(super) fn shown_store(rect: Rect, size: (u32, u32)) { SHOWN.store(Some(Arc::new( diff --git a/yazi-config/Cargo.toml b/yazi-config/Cargo.toml index f7b465a4..40aa2def 100644 --- a/yazi-config/Cargo.toml +++ b/yazi-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yazi-config" -version = "0.1.5" +version = "0.2.0" edition = "2021" license = "MIT" authors = [ "sxyazi " ] @@ -9,7 +9,7 @@ homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" [dependencies] -yazi-shared = { path = "../yazi-shared", version = "0.1.5" } +yazi-shared = { path = "../yazi-shared", version = "0.2.0" } # External dependencies anyhow = "^1" diff --git a/yazi-core/Cargo.toml b/yazi-core/Cargo.toml index 579246b8..e5b36707 100644 --- a/yazi-core/Cargo.toml +++ b/yazi-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yazi-core" -version = "0.1.5" +version = "0.2.0" edition = "2021" license = "MIT" authors = [ "sxyazi " ] @@ -9,11 +9,11 @@ homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" [dependencies] -yazi-adaptor = { path = "../yazi-adaptor", version = "0.1.5" } -yazi-config = { path = "../yazi-config", version = "0.1.5" } -yazi-plugin = { path = "../yazi-plugin", version = "0.1.5" } -yazi-scheduler = { path = "../yazi-scheduler", version = "0.1.5" } -yazi-shared = { path = "../yazi-shared", version = "0.1.5" } +yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.0" } +yazi-config = { path = "../yazi-config", version = "0.2.0" } +yazi-plugin = { path = "../yazi-plugin", version = "0.2.0" } +yazi-scheduler = { path = "../yazi-scheduler", version = "0.2.0" } +yazi-shared = { path = "../yazi-shared", version = "0.2.0" } # External dependencies anyhow = "^1" diff --git a/yazi-fm/Cargo.toml b/yazi-fm/Cargo.toml index 7d065fd2..6581997f 100644 --- a/yazi-fm/Cargo.toml +++ b/yazi-fm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yazi-fm" -version = "0.1.5" +version = "0.2.0" edition = "2021" license = "MIT" authors = [ "sxyazi " ] @@ -9,12 +9,12 @@ homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" [dependencies] -yazi-adaptor = { path = "../yazi-adaptor", version = "0.1.5" } -yazi-config = { path = "../yazi-config", version = "0.1.5" } -yazi-core = { path = "../yazi-core", version = "0.1.5" } -yazi-plugin = { path = "../yazi-plugin", version = "0.1.5" } -yazi-scheduler = { path = "../yazi-scheduler", version = "0.1.5" } -yazi-shared = { path = "../yazi-shared", version = "0.1.5" } +yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.0" } +yazi-config = { path = "../yazi-config", version = "0.2.0" } +yazi-core = { path = "../yazi-core", version = "0.2.0" } +yazi-plugin = { path = "../yazi-plugin", version = "0.2.0" } +yazi-scheduler = { path = "../yazi-scheduler", version = "0.2.0" } +yazi-shared = { path = "../yazi-shared", version = "0.2.0" } # External dependencies ansi-to-tui = "^3" diff --git a/yazi-fm/src/widgets/clear.rs b/yazi-fm/src/widgets/clear.rs index 013cd5c5..ec4ed5c7 100644 --- a/yazi-fm/src/widgets/clear.rs +++ b/yazi-fm/src/widgets/clear.rs @@ -2,7 +2,6 @@ use std::sync::atomic::Ordering; use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget}; use yazi_adaptor::ADAPTOR; -use yazi_config::LAYOUT; use crate::root::COLLISION; @@ -29,7 +28,7 @@ impl Widget for Clear { fn render(self, area: Rect, buf: &mut Buffer) { ratatui::widgets::Clear.render(area, buf); - let Some(r) = overlap(&area, &LAYOUT.load().preview) else { + let Some(r) = ADAPTOR.shown_load().and_then(|r| overlap(&area, &r)) else { return; }; diff --git a/yazi-plugin/Cargo.toml b/yazi-plugin/Cargo.toml index 666787e7..34aa4d11 100644 --- a/yazi-plugin/Cargo.toml +++ b/yazi-plugin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yazi-plugin" -version = "0.1.5" +version = "0.2.0" edition = "2021" license = "MIT" authors = [ "sxyazi " ] @@ -9,9 +9,9 @@ homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" [dependencies] -yazi-adaptor = { path = "../yazi-adaptor", version = "0.1.5" } -yazi-config = { path = "../yazi-config", version = "0.1.5" } -yazi-shared = { path = "../yazi-shared", version = "0.1.5" } +yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.0" } +yazi-config = { path = "../yazi-config", version = "0.2.0" } +yazi-shared = { path = "../yazi-shared", version = "0.2.0" } # External dependencies ansi-to-tui = "^3" diff --git a/yazi-plugin/preset/components/folder.lua b/yazi-plugin/preset/components/folder.lua index dc6b604a..8be22250 100644 --- a/yazi-plugin/preset/components/folder.lua +++ b/yazi-plugin/preset/components/folder.lua @@ -85,7 +85,7 @@ function Folder:markers(area, markers) x = math.max(0, area.x - 1), y = y, w = 1, - h = 1 + math.min(last[2] - last[1], area.h - y), + h = math.min(1 + last[2] - last[1], area.y + area.h - y), }, ui.Bar.LEFT ) diff --git a/yazi-scheduler/Cargo.toml b/yazi-scheduler/Cargo.toml index 31898978..4bce2263 100644 --- a/yazi-scheduler/Cargo.toml +++ b/yazi-scheduler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yazi-scheduler" -version = "0.1.5" +version = "0.2.0" edition = "2021" license = "MIT" authors = [ "sxyazi " ] @@ -9,10 +9,10 @@ homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" [dependencies] -yazi-adaptor = { path = "../yazi-adaptor", version = "0.1.5" } -yazi-config = { path = "../yazi-config", version = "0.1.5" } -yazi-shared = { path = "../yazi-shared", version = "0.1.5" } -yazi-plugin = { path = "../yazi-plugin", version = "0.1.5" } +yazi-adaptor = { path = "../yazi-adaptor", version = "0.2.0" } +yazi-config = { path = "../yazi-config", version = "0.2.0" } +yazi-shared = { path = "../yazi-shared", version = "0.2.0" } +yazi-plugin = { path = "../yazi-plugin", version = "0.2.0" } # External dependencies anyhow = "^1" diff --git a/yazi-shared/Cargo.toml b/yazi-shared/Cargo.toml index 4ef12e80..62b33eeb 100644 --- a/yazi-shared/Cargo.toml +++ b/yazi-shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yazi-shared" -version = "0.1.5" +version = "0.2.0" edition = "2021" license = "MIT" authors = [ "sxyazi " ]