mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
chore: upgrade ratatui to 0.28.1 (#1601)
This commit is contained in:
parent
e940d81d2a
commit
ff04e2d21f
18 changed files with 116 additions and 100 deletions
134
Cargo.lock
generated
134
Cargo.lock
generated
|
|
@ -67,9 +67,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ansi-to-tui"
|
||||
version = "5.0.0-rc.1"
|
||||
version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "428c2992b874104caf39204b05bf89eab4ceefdd4fcb26caa6759906f547f8e8"
|
||||
checksum = "00c4af0bef1b514c9b6a32a773caf604c1390fa7913f4eaa23bfe76f251d6a42"
|
||||
dependencies = [
|
||||
"nom",
|
||||
"ratatui",
|
||||
|
|
@ -153,7 +153,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -345,9 +345,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.1.13"
|
||||
version = "1.1.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48"
|
||||
checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"libc",
|
||||
|
|
@ -442,7 +442,7 @@ dependencies = [
|
|||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -474,13 +474,14 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
|
|||
|
||||
[[package]]
|
||||
name = "compact_str"
|
||||
version = "0.7.1"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f"
|
||||
checksum = "6050c3a16ddab2e412160b31f2c871015704239bca62f72f6e5f0be631d3f644"
|
||||
dependencies = [
|
||||
"castaway",
|
||||
"cfg-if",
|
||||
"itoa",
|
||||
"rustversion",
|
||||
"ryu",
|
||||
"static_assertions",
|
||||
]
|
||||
|
|
@ -557,17 +558,18 @@ checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
|
|||
|
||||
[[package]]
|
||||
name = "crossterm"
|
||||
version = "0.27.0"
|
||||
version = "0.28.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df"
|
||||
checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"crossterm_winapi",
|
||||
"filedescriptor",
|
||||
"futures-core",
|
||||
"libc",
|
||||
"mio 0.8.11",
|
||||
"mio 1.0.2",
|
||||
"parking_lot",
|
||||
"rustix",
|
||||
"signal-hook",
|
||||
"signal-hook-mio",
|
||||
"winapi",
|
||||
|
|
@ -619,7 +621,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -630,7 +632,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178"
|
|||
dependencies = [
|
||||
"darling_core",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -660,7 +662,7 @@ dependencies = [
|
|||
"darling",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -670,7 +672,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b"
|
||||
dependencies = [
|
||||
"derive_builder_core",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -916,7 +918,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1167,6 +1169,16 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instability"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b23a0c8dfe501baac4adf6ebbfa6eddf8f0c07f56b058cc1288017e32397846c"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.13"
|
||||
|
|
@ -1184,7 +1196,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1348,9 +1360,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lru"
|
||||
version = "0.12.3"
|
||||
version = "0.12.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc"
|
||||
checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
]
|
||||
|
|
@ -1435,6 +1447,7 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
|
|||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"log",
|
||||
"wasi",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
|
@ -1482,7 +1495,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1575,7 +1588,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1855,7 +1868,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1884,9 +1897,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.36"
|
||||
version = "1.0.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
||||
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
|
@ -1923,18 +1936,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ratatui"
|
||||
version = "0.27.0"
|
||||
version = "0.28.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d16546c5b5962abf8ce6e2881e722b4e0ae3b6f1a08a26ae3573c55853ca68d3"
|
||||
checksum = "fdef7f9be5c0122f890d58bdf4d964349ba6a6161f705907526d891efabba57d"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"cassowary",
|
||||
"compact_str",
|
||||
"crossterm",
|
||||
"instability",
|
||||
"itertools 0.13.0",
|
||||
"lru",
|
||||
"paste",
|
||||
"stability",
|
||||
"strum",
|
||||
"strum_macros",
|
||||
"unicode-segmentation",
|
||||
|
|
@ -2092,9 +2105,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
|
|||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.34"
|
||||
version = "0.38.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
|
||||
checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"errno",
|
||||
|
|
@ -2157,7 +2170,7 @@ checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2219,7 +2232,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"mio 0.8.11",
|
||||
"mio 1.0.2",
|
||||
"signal-hook",
|
||||
]
|
||||
|
||||
|
|
@ -2299,16 +2312,6 @@ dependencies = [
|
|||
"lock_api",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "stability"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
|
|
@ -2340,7 +2343,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"rustversion",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2356,9 +2359,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.74"
|
||||
version = "2.0.76"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7"
|
||||
checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -2422,7 +2425,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2540,7 +2543,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2633,7 +2636,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2673,9 +2676,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "trash"
|
||||
version = "5.1.0"
|
||||
version = "5.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a154e8323dbd402514d5a3c0f12e0a5bddf72de674b565d58a5535500566428b"
|
||||
checksum = "33caf2a9be1812a263a4bfce74d2de225fcde12ee7b77001361abd2b34ffdcc4"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"libc",
|
||||
|
|
@ -2815,7 +2818,7 @@ dependencies = [
|
|||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2893,34 +2896,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.92"
|
||||
version = "0.2.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
|
||||
checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.92"
|
||||
version = "0.2.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
|
||||
checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.92"
|
||||
version = "0.2.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
|
||||
checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
|
|
@ -2928,22 +2932,22 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.92"
|
||||
version = "0.2.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
|
||||
checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.92"
|
||||
version = "0.2.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
|
||||
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
|
||||
|
||||
[[package]]
|
||||
name = "weezl"
|
||||
|
|
@ -3033,7 +3037,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3044,7 +3048,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3499,7 +3503,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.76",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ panic = "abort"
|
|||
strip = true
|
||||
|
||||
[workspace.dependencies]
|
||||
ansi-to-tui = "5.0.0-rc.1"
|
||||
ansi-to-tui = "6.0.0"
|
||||
anyhow = "1.0.86"
|
||||
arc-swap = "1.7.1"
|
||||
base64 = "0.22.1"
|
||||
bitflags = "2.6.0"
|
||||
clap = { version = "4.5.16", features = [ "derive" ] }
|
||||
crossterm = { version = "0.27.0", features = [ "event-stream" ] }
|
||||
crossterm = { version = "0.28.1", features = [ "event-stream" ] }
|
||||
dirs = "5.0.1"
|
||||
futures = "0.3.30"
|
||||
globset = "0.4.14"
|
||||
|
|
@ -24,7 +24,7 @@ libc = "0.2.158"
|
|||
md-5 = "0.10.6"
|
||||
mlua = { version = "0.9.9", features = [ "lua54", "serialize", "macros", "async" ] }
|
||||
parking_lot = "0.12.3"
|
||||
ratatui = { version = "0.27.0", features = [ "unstable-rendered-line-info" ] }
|
||||
ratatui = { version = "0.28.1", features = [ "unstable-rendered-line-info" ] }
|
||||
regex = "1.10.6"
|
||||
scopeguard = "1.2.0"
|
||||
serde = { version = "1.0.209", features = [ "derive" ] }
|
||||
|
|
|
|||
|
|
@ -29,4 +29,4 @@ tokio = { workspace = true }
|
|||
tracing = { workspace = true }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ serde_json = { workspace = true }
|
|||
vergen-gitcl = { version = "1.0.0", features = [ "build" ] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
|
||||
|
||||
[[bin]]
|
||||
name = "ya"
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ toml = { version = "0.8.19", features = [ "preserve_order" ] }
|
|||
validator = { version = "0.18.1", features = [ "derive" ] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
|
||||
|
|
|
|||
|
|
@ -40,4 +40,4 @@ unicode-width = { workspace = true }
|
|||
libc = { workspace = true }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ libc = { workspace = true }
|
|||
signal-hook-tokio = { version = "0.3.1", features = [ "futures-v0_3" ] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
|
||||
|
||||
[target.'cfg(all(not(target_os = "macos"), not(target_os = "windows")))'.dependencies]
|
||||
tikv-jemallocator = "0.6.0"
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ impl App {
|
|||
let collision = COLLISION.swap(false, Ordering::Relaxed);
|
||||
let frame = term
|
||||
.draw(|f| {
|
||||
_ = Lives::scope(&self.cx, |_| Ok(f.render_widget(Root::new(&self.cx), f.size())));
|
||||
_ = Lives::scope(&self.cx, |_| Ok(f.render_widget(Root::new(&self.cx), f.area())));
|
||||
|
||||
if let Some((x, y)) = self.cx.cursor() {
|
||||
f.set_cursor(x, y);
|
||||
if let Some(pos) = self.cx.cursor() {
|
||||
f.set_cursor_position(pos);
|
||||
}
|
||||
})
|
||||
.unwrap();
|
||||
|
|
@ -51,10 +51,10 @@ impl App {
|
|||
|
||||
let frame = term
|
||||
.draw_partial(|f| {
|
||||
f.render_widget(crate::notify::Layout::new(&self.cx), f.size());
|
||||
f.render_widget(crate::notify::Layout::new(&self.cx), f.area());
|
||||
|
||||
if let Some((x, y)) = self.cx.cursor() {
|
||||
f.set_cursor(x, y);
|
||||
if let Some(pos) = self.cx.cursor() {
|
||||
f.set_cursor_position(pos);
|
||||
}
|
||||
})
|
||||
.unwrap();
|
||||
|
|
@ -69,20 +69,20 @@ impl App {
|
|||
let mut new = Buffer::empty(frame.area);
|
||||
for y in new.area.top()..new.area.bottom() {
|
||||
for x in new.area.left()..new.area.right() {
|
||||
let cell = frame.buffer.get(x, y);
|
||||
let cell = &frame.buffer[(x, y)];
|
||||
if cell.skip {
|
||||
*new.get_mut(x, y) = cell.clone();
|
||||
new[(x, y)] = cell.clone();
|
||||
}
|
||||
new.get_mut(x, y).set_skip(!cell.skip);
|
||||
new[(x, y)].set_skip(!cell.skip);
|
||||
}
|
||||
}
|
||||
|
||||
let patches = frame.buffer.diff(&new);
|
||||
let mut backend = CrosstermBackend::new(BufWriter::new(stderr().lock()));
|
||||
backend.draw(patches.into_iter()).ok();
|
||||
if let Some((x, y)) = cursor {
|
||||
if let Some(pos) = cursor {
|
||||
backend.show_cursor().ok();
|
||||
backend.set_cursor(x, y).ok();
|
||||
backend.set_cursor_position(pos).ok();
|
||||
}
|
||||
backend.flush().ok();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ impl App {
|
|||
_ = Lives::scope(&self.cx, |_| {
|
||||
for patch in Progress::partial_render(term.current_buffer_mut()) {
|
||||
term.backend_mut().draw(patch.iter().map(|(x, y, cell)| (*x, *y, cell)))?;
|
||||
if let Some((x, y)) = self.cx.cursor() {
|
||||
if let Some(pos) = self.cx.cursor() {
|
||||
term.show_cursor()?;
|
||||
term.set_cursor(x, y)?;
|
||||
term.set_cursor_position(pos)?;
|
||||
}
|
||||
term.backend_mut().flush()?;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ impl Progress {
|
|||
let mut patch = Vec::with_capacity(area.width as usize * area.height as usize);
|
||||
for y in area.top()..area.bottom() {
|
||||
for x in area.left()..area.right() {
|
||||
patch.push((x, y, mem::take(buf.get_mut(x, y))));
|
||||
patch.push((x, y, mem::take(&mut buf[(x, y)])));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,9 +118,9 @@ impl Term {
|
|||
let buffer = frame.buffer_mut();
|
||||
for y in self.last_area.top()..self.last_area.bottom() {
|
||||
for x in self.last_area.left()..self.last_area.right() {
|
||||
let mut cell = self.last_buffer.get(x, y).clone();
|
||||
let mut cell = self.last_buffer[(x, y)].clone();
|
||||
cell.skip = false;
|
||||
*buffer.get_mut(x, y) = cell;
|
||||
buffer[(x, y)] = cell;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ impl Term {
|
|||
|
||||
#[inline]
|
||||
pub(super) fn can_partial(&mut self) -> bool {
|
||||
self.inner.autoresize().is_ok() && self.last_area == self.inner.get_frame().size()
|
||||
self.inner.autoresize().is_ok() && self.last_area == self.inner.get_frame().area()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -47,4 +47,4 @@ uzers = { workspace = true }
|
|||
clipboard-win = "5.4.0"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ impl<'lua, T> IntoLua<'lua> for Range<T>
|
|||
where
|
||||
T: IntoLua<'lua>,
|
||||
{
|
||||
fn into_lua(self, lua: &'lua mlua::Lua) -> mlua::Result<mlua::Value> {
|
||||
fn into_lua(self, lua: &'lua mlua::Lua) -> mlua::Result<mlua::Value<'lua>> {
|
||||
lua.create_sequence_from([self.0.start, self.0.end])?.into_lua(lua)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ impl Renderable for Bar {
|
|||
|
||||
if self.direction.contains(Borders::LEFT) {
|
||||
for y in self.area.top()..self.area.bottom() {
|
||||
let cell = buf.get_mut(self.area.left(), y).set_symbol(symbol);
|
||||
let cell = buf[(self.area.left(), y)].set_symbol(symbol);
|
||||
if let Some(style) = self.style {
|
||||
cell.set_style(style);
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ impl Renderable for Bar {
|
|||
}
|
||||
if self.direction.contains(Borders::TOP) {
|
||||
for x in self.area.left()..self.area.right() {
|
||||
let cell = buf.get_mut(x, self.area.top()).set_symbol(symbol);
|
||||
let cell = buf[(x, self.area.top())].set_symbol(symbol);
|
||||
if let Some(style) = self.style {
|
||||
cell.set_style(style);
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ impl Renderable for Bar {
|
|||
if self.direction.contains(Borders::RIGHT) {
|
||||
let x = self.area.right() - 1;
|
||||
for y in self.area.top()..self.area.bottom() {
|
||||
let cell = buf.get_mut(x, y).set_symbol(symbol);
|
||||
let cell = buf[(x, y)].set_symbol(symbol);
|
||||
if let Some(style) = self.style {
|
||||
cell.set_style(style);
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ impl Renderable for Bar {
|
|||
if self.direction.contains(Borders::BOTTOM) {
|
||||
let y = self.area.bottom() - 1;
|
||||
for x in self.area.left()..self.area.right() {
|
||||
let cell = buf.get_mut(x, y).set_symbol(symbol);
|
||||
let cell = buf[(x, y)].set_symbol(symbol);
|
||||
if let Some(style) = self.style {
|
||||
cell.set_style(style);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ impl ratatui::widgets::Widget for Clear {
|
|||
COLLISION.store(true, Ordering::Relaxed);
|
||||
for y in r.top()..r.bottom() {
|
||||
for x in r.left()..r.right() {
|
||||
buf.get_mut(x, y).set_skip(true);
|
||||
buf[(x, y)].set_skip(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ impl Rect {
|
|||
})
|
||||
})?;
|
||||
|
||||
let rect = lua.create_table_from([("default", Rect::cast(lua, Default::default())?)])?;
|
||||
let rect =
|
||||
lua.create_table_from([("default", Rect::cast(lua, ratatui::layout::Rect::default())?)])?;
|
||||
|
||||
rect.set_metatable(Some(lua.create_table_from([("__call", new)])?));
|
||||
|
||||
|
|
@ -57,3 +58,14 @@ impl Cast<ratatui::layout::Rect> for Rect {
|
|||
lua.create_any_userdata(data)
|
||||
}
|
||||
}
|
||||
|
||||
impl Cast<ratatui::layout::Size> for Rect {
|
||||
fn cast(lua: &Lua, data: ratatui::layout::Size) -> mlua::Result<AnyUserData> {
|
||||
lua.create_any_userdata(ratatui::layout::Rect {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: data.width,
|
||||
height: data.height,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ tracing = { workspace = true }
|
|||
libc = { workspace = true }
|
||||
|
||||
[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||
trash = "5.1.0"
|
||||
trash = "5.1.1"
|
||||
|
|
|
|||
|
|
@ -31,4 +31,4 @@ uzers = { workspace = true }
|
|||
windows-sys = { version = "0.59.0", features = [ "Win32_Storage_FileSystem", "Win32_UI_Shell" ] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty" ] }
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue