From d4c22fe7f9c44b0ee31b7c90795ee5e8906f2f0f Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Fri, 31 Jul 2026 22:57:00 +0200 Subject: [PATCH] swap alacritty_terminal for rio-vt --- Cargo.lock | 825 ++++++++++++++++++++++++++++++------ Cargo.toml | 2 +- src/terminal/emu.rs | 145 ++++--- src/terminal/integration.rs | 2 +- 4 files changed, 772 insertions(+), 202 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9f7f7f..18181f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,31 +17,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alacritty_terminal" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda177466b9524d59f1b12f0dd30b68696788e9992a7e959021c4a0ed96fcf59" -dependencies = [ - "base64", - "bitflags 2.13.0", - "home", - "libc", - "log", - "miow", - "parking_lot", - "piper", - "polling", - "regex-automata", - "rustix 1.1.4", - "rustix-openpty", - "serde", - "signal-hook 0.4.4", - "unicode-width", - "vte", - "windows-sys 0.59.0", -] - [[package]] name = "anstream" version = "1.0.0" @@ -98,18 +73,6 @@ version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" -[[package]] -name = "arrayvec" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02882884d3e1bc524fb12c79f107f6ad0e1cfd498c536ffb494301740995dfe" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "base64" version = "0.22.1" @@ -127,10 +90,43 @@ name = "bitflags" version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" dependencies = [ - "serde_core", + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f65693059b6b9c588b9f62fed1cedbf0a8b805631457ea162d68f0de186f3de5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", ] +[[package]] +name = "cc" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.4" @@ -174,7 +170,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -189,15 +185,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "console" version = "0.15.11" @@ -212,19 +199,32 @@ dependencies = [ ] [[package]] -name = "crc32fast" -version = "1.5.0" +name = "corcovado" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +checksum = "cd05e26c10dcb00065bab74f7871c7bb8623d11319245107be65399a823734d1" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "libc", + "miow 0.5.0", + "slab", + "socket2", + "tracing", + "windows", + "windows-sys 0.42.0", ] [[package]] -name = "crossbeam-utils" -version = "0.8.21" +name = "crc32fast" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if 1.0.4", +] [[package]] name = "crossterm" @@ -236,7 +236,7 @@ dependencies = [ "crossterm_winapi", "mio", "parking_lot", - "rustix 0.38.44", + "rustix", "signal-hook 0.3.18", "signal-hook-mio", "winapi", @@ -289,6 +289,17 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + [[package]] name = "doctest-file" version = "1.1.1" @@ -317,12 +328,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "fastrand" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" - [[package]] name = "filedescriptor" version = "0.8.3" @@ -334,6 +339,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + [[package]] name = "flate2" version = "1.1.9" @@ -345,10 +356,29 @@ dependencies = [ ] [[package]] -name = "futures-io" -version = "0.3.32" +name = "form_urlencoded" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags 1.3.2", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "getrandom" @@ -356,7 +386,7 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ - "cfg-if", + "cfg-if 1.0.4", "libc", "wasi", ] @@ -368,18 +398,106 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "hermit-abi" -version = "0.5.2" +name = "icu_collections" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "home" -version = "0.5.12" +name = "icu_locale_core" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ - "windows-sys 0.61.2", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -395,6 +513,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -435,10 +562,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] -name = "linux-raw-sys" -version = "0.12.1" +name = "litemap" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "lock_api" @@ -483,6 +610,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "miow" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ffbca2f655e33c08be35d87278e5b18b89550a37dbd598c20db92f6a471123" +dependencies = [ + "windows-sys 0.42.0", +] + [[package]] name = "miow" version = "0.6.1" @@ -499,7 +635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags 2.13.0", - "cfg-if", + "cfg-if 1.0.4", "cfg_aliases", "libc", ] @@ -538,7 +674,7 @@ version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ - "cfg-if", + "cfg-if 1.0.4", "libc", "redox_syscall", "smallvec", @@ -546,36 +682,36 @@ dependencies = [ ] [[package]] -name = "pin-project-lite" -version = "0.2.17" +name = "percent-encoding" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] -name = "piper" -version = "0.2.5" +name = "phf" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", + "phf_shared", + "serde", ] [[package]] -name = "polling" -version = "3.11.0" +name = "phf_shared" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix 1.1.4", - "windows-sys 0.61.2", + "siphasher", ] +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + [[package]] name = "portable-pty" version = "0.9.0" @@ -597,6 +733,15 @@ dependencies = [ "winreg", ] +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -671,40 +816,73 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] -name = "rustix" -version = "0.38.44" +name = "rio-grapheme-width" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +checksum = "3aa3b2ac35b9f82e8bbea84b250c6e20c18008480c69bef513ccd04f540668c8" dependencies = [ - "bitflags 2.13.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "phf", + "ucd-trie", ] [[package]] -name = "rustix" -version = "1.1.4" +name = "rio-graphics" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "fe345f48460f7ca26cd0ed608da704f3cf960f1b6b7c4bee623a09e07630e243" dependencies = [ + "rustc-hash", + "tracing", +] + +[[package]] +name = "rio-vt" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c6aea518ba04c39329890a641d3f94e8f2d875b58c363db60bff68d8458649" +dependencies = [ + "base64", "bitflags 2.13.0", - "errno", + "bytemuck", + "corcovado", + "cursor-icon", + "flate2", + "lazy_static", "libc", - "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "memchr", + "parking_lot", + "regex", + "regex-automata", + "rio-grapheme-width", + "rio-graphics", + "rustc-hash", + "serde", + "simdutf", + "smallvec", + "teletypewriter", + "tracing", + "unicode-width-16", + "url", + "windows-sys 0.60.2", ] [[package]] -name = "rustix-openpty" -version = "0.2.0" +name = "rustc-hash" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de16c7c59892b870a6336f185dc10943517f1327447096bbb7bb32cd85e2393" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ + "bitflags 2.13.0", "errno", "libc", - "rustix 1.1.4", + "linux-raw-sys", + "windows-sys 0.59.0", ] [[package]] @@ -740,7 +918,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -762,7 +940,7 @@ version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eb6ea5562eeaed6936b8b54e086aa0f88b9e5b1bef45beb038e2519fa1185b1" dependencies = [ - "cfg-if", + "cfg-if 1.0.4", "libc", "windows-sys 0.61.2", ] @@ -781,7 +959,6 @@ dependencies = [ name = "shell-use" version = "0.0.1-beta.5" dependencies = [ - "alacritty_terminal", "anyhow", "clap", "crossterm", @@ -791,6 +968,7 @@ dependencies = [ "interprocess", "portable-pty", "regex", + "rio-vt", "serde", "serde_json", "ttf-parser", @@ -802,6 +980,12 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + [[package]] name = "signal-hook" version = "0.3.18" @@ -849,12 +1033,50 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +[[package]] +name = "simdutf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f542752c7335a9174e7bb81112c3ca1415a7a6b6ec2c3e840aca347a30f9141" +dependencies = [ + "bitflags 2.13.0", + "cc", +] + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + [[package]] name = "smallvec" version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + [[package]] name = "strsim" version = "0.11.1" @@ -872,6 +1094,45 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "teletypewriter" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46cb37087a3295162e2ab3994d2478a9dad4410993d8b15c5a306b70a3c153d1" +dependencies = [ + "corcovado", + "dirs", + "iovec", + "libc", + "miow 0.6.1", + "parking_lot", + "signal-hook 0.4.4", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -898,7 +1159,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -909,7 +1170,48 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", ] [[package]] @@ -918,6 +1220,12 @@ version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + [[package]] name = "unicode-ident" version = "1.0.24" @@ -931,25 +1239,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] -name = "utf8parse" -version = "0.2.2" +name = "unicode-width-16" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "9eba15036aa0f5bf8ed6cd12a624ddb61fd50b0779b1c05d89b663bcaed7b5c2" [[package]] -name = "vte" -version = "0.15.0" +name = "url" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5924018406ce0063cd67f8e008104968b74b563ee1b85dde3ed1f7cb87d3dbd" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ - "arrayvec", - "bitflags 2.13.0", - "cursor-icon", - "log", - "memchr", + "form_urlencoded", + "idna", + "percent-encoding", "serde", ] +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -984,19 +1302,58 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0286ba339aa753e70765d521bb0242cc48e1194562bfa2a2ad7ac8a6de28f5d5" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", ] [[package]] @@ -1014,64 +1371,171 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winreg" version = "0.10.1" @@ -1081,6 +1545,89 @@ dependencies = [ "winapi", ] +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "zmij" version = "1.0.21" diff --git a/Cargo.toml b/Cargo.toml index d5dfc11..ed83be6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ strip = true lto = true [dependencies] -alacritty_terminal = "0.26.0" +rio-vt = "0.5.3" anyhow = "1.0.102" clap = { version = "4.6.1", features = ["derive", "env"] } dirs = "6.0.0" diff --git a/src/terminal/emu.rs b/src/terminal/emu.rs index e3505aa..bffdfbb 100644 --- a/src/terminal/emu.rs +++ b/src/terminal/emu.rs @@ -1,17 +1,19 @@ -//! Terminal-emulator wrapper around `alacritty_terminal`. Exposes the small +//! Terminal-emulator wrapper around `rio-vt`. Exposes the small //! grid/cell/color surface the rest of shell-use consumes, plus a capture //! proxy that queues the terminal's replies so the reader can forward them //! back to the PTY. use std::sync::{Arc, Mutex}; -use alacritty_terminal::event::{Event, EventListener}; -use alacritty_terminal::grid::Dimensions; -use alacritty_terminal::index::{Column, Line}; -use alacritty_terminal::term::cell::Flags as AlacFlags; -use alacritty_terminal::term::test::TermSize; -use alacritty_terminal::term::{Config as AlacConfig, Term}; -use alacritty_terminal::vte::ansi; +use rio_vt::ansi::CursorShape; +use rio_vt::config::colors::{AnsiColor, NamedColor}; +use rio_vt::crosswords::grid::Dimensions; +use rio_vt::crosswords::pos::{Column, Line}; +use rio_vt::crosswords::square::{ContentTag, Square, Wide}; +use rio_vt::crosswords::style::{Style, StyleFlags}; +use rio_vt::crosswords::{Crosswords, CrosswordsSize}; +use rio_vt::event::{EventListener, RioEvent, WindowId}; +use rio_vt::performer::handler::Processor; use crate::terminal::integration::CommandTracker; @@ -23,14 +25,19 @@ pub enum Color { } impl Color { - fn from_alac(c: ansi::Color) -> Self { + fn from_vt(c: AnsiColor) -> Self { match c { - ansi::Color::Named(named) => match named { - ansi::NamedColor::Foreground | ansi::NamedColor::Background => Color::Default, - other => Color::Idx(other as u8), - }, - ansi::Color::Spec(rgb) => Color::Rgb(rgb.r, rgb.g, rgb.b), - ansi::Color::Indexed(i) => Color::Idx(i), + AnsiColor::Named(NamedColor::Foreground | NamedColor::Background) => Color::Default, + AnsiColor::Named(named) => { + let index = named as u32; + if index < 16 { + Color::Idx(index as u8) + } else { + Color::Default + } + } + AnsiColor::Indexed(i) => Color::Idx(i), + AnsiColor::Spec(rgb) => Color::Rgb(rgb.r, rgb.g, rgb.b), } } } @@ -50,32 +57,43 @@ pub struct EmuCell { pub strike: bool, } -fn cell_from_alac(c: &alacritty_terminal::term::cell::Cell) -> EmuCell { - let flags = c.flags; - let spacer = flags.contains(AlacFlags::WIDE_CHAR_SPACER) - || flags.contains(AlacFlags::LEADING_WIDE_CHAR_SPACER); - let ch = if spacer || (c.c == ' ' && !flags.contains(AlacFlags::WIDE_CHAR)) { +fn cell_from_square(square: &Square, styles: &[Style]) -> EmuCell { + let spacer = !matches!(square.wide(), Wide::Narrow | Wide::Wide); + let c = square.c(); + let ch = if spacer || c == ' ' || c == '\0' { String::new() } else { - c.c.to_string() + c.to_string() + }; + let (fg, bg, flags) = match square.content_tag() { + ContentTag::Codepoint => { + let style = styles + .get(square.style_id() as usize) + .copied() + .unwrap_or_default(); + (Color::from_vt(style.fg), Color::from_vt(style.bg), style.flags) + } + ContentTag::BgPalette => ( + Color::Default, + Color::Idx(square.bg_palette_index()), + StyleFlags::empty(), + ), + ContentTag::BgRgb => { + let (r, g, b) = square.bg_rgb(); + (Color::Default, Color::Rgb(r, g, b), StyleFlags::empty()) + } }; EmuCell { ch, - fg: Color::from_alac(c.fg), - bg: Color::from_alac(c.bg), - bold: flags.contains(AlacFlags::BOLD), - dim: flags.contains(AlacFlags::DIM), - italic: flags.contains(AlacFlags::ITALIC), - underline: flags.intersects( - AlacFlags::UNDERLINE - | AlacFlags::DOUBLE_UNDERLINE - | AlacFlags::DOTTED_UNDERLINE - | AlacFlags::DASHED_UNDERLINE - | AlacFlags::UNDERCURL, - ), - inverse: flags.contains(AlacFlags::INVERSE), - invisible: flags.contains(AlacFlags::HIDDEN), - strike: flags.contains(AlacFlags::STRIKEOUT), + fg, + bg, + bold: flags.contains(StyleFlags::BOLD), + dim: flags.contains(StyleFlags::DIM), + italic: flags.contains(StyleFlags::ITALIC), + underline: flags.intersects(StyleFlags::ALL_UNDERLINES), + inverse: flags.contains(StyleFlags::INVERSE), + invisible: flags.contains(StyleFlags::HIDDEN), + strike: flags.contains(StyleFlags::STRIKEOUT), } } @@ -85,18 +103,22 @@ struct CaptureProxy { } impl EventListener for CaptureProxy { - fn send_event(&self, ev: Event) { - if let Event::PtyWrite(bytes) = ev { + fn event(&self) -> (Option, bool) { + (None, false) + } + + fn send_event(&self, event: RioEvent, _id: WindowId) { + if let RioEvent::PtyWrite(_route, text) = event { if let Ok(mut buf) = self.pending.lock() { - buf.extend_from_slice(bytes.as_bytes()); + buf.extend_from_slice(text.as_bytes()); } } } } pub struct Emu { - term: Term, - processor: ansi::Processor, + term: Crosswords, + processor: Processor, tracker: CommandTracker, cols: u16, rows: u16, @@ -105,18 +127,21 @@ pub struct Emu { impl Emu { pub fn new(cols: u16, rows: u16, scrollback: usize) -> Self { - let size = TermSize::new(cols as usize, rows as usize); - let config = AlacConfig { - scrolling_history: scrollback, - ..Default::default() - }; let pending: Arc>> = Arc::default(); let proxy = CaptureProxy { pending: pending.clone(), }; + let size = CrosswordsSize::new(cols.max(1) as usize, rows.max(1) as usize); Emu { - term: Term::new(config, &size, proxy), - processor: ansi::Processor::new(), + term: Crosswords::new( + size, + CursorShape::Block, + proxy, + WindowId::from(0), + 0, + scrollback, + ), + processor: Processor::default(), tracker: CommandTracker::new(), cols, rows, @@ -144,7 +169,7 @@ impl Emu { pub fn resize(&mut self, cols: u16, rows: u16) { self.term - .resize(TermSize::new(cols as usize, rows as usize)); + .resize(CrosswordsSize::new(cols.max(1) as usize, rows.max(1) as usize)); self.cols = cols; self.rows = rows; } @@ -155,9 +180,9 @@ impl Emu { /// Cursor position as `(x, y)` (column, row), 0-based, clamped to screen. pub fn cursor(&self) -> (u16, u16) { - let p = self.term.grid().cursor.point; - let y = p.line.0.max(0).min(self.rows as i32 - 1) as u16; - let x = (p.column.0 as u16).min(self.cols.saturating_sub(1)); + let p = self.term.cursor().pos; + let y = p.row.0.max(0).min(self.rows as i32 - 1) as u16; + let x = (p.col.0 as u16).min(self.cols.saturating_sub(1)); (x, y) } @@ -168,23 +193,21 @@ impl Emu { /// History + visible screen as rows of cells. pub fn full_rows(&self) -> Vec> { - let grid = self.term.grid(); - let total = grid.total_lines() as i32; - let screen = grid.screen_lines() as i32; - let history = (total - screen).max(0); + let history = self.term.history_size() as i32; + let screen = self.term.grid.screen_lines() as i32; self.rows_in_range(-history, screen) } fn rows_in_range(&self, start: i32, end: i32) -> Vec> { - let grid = self.term.grid(); + let styles = self.term.grid.style_set.styles(); let mut out = Vec::with_capacity((end - start).max(0) as usize); for line in start..end { - let mut row = Vec::with_capacity(self.cols as usize); + let row = &self.term.grid[Line(line)]; + let mut cells = Vec::with_capacity(self.cols as usize); for col in 0..self.cols as usize { - let cell = &grid[Line(line)][Column(col)]; - row.push(cell_from_alac(cell)); + cells.push(cell_from_square(&row[Column(col)], styles)); } - out.push(row); + out.push(cells); } out } diff --git a/src/terminal/integration.rs b/src/terminal/integration.rs index 3ff6479..1e7ace6 100644 --- a/src/terminal/integration.rs +++ b/src/terminal/integration.rs @@ -1,6 +1,6 @@ //! Command and output tracking from the PTY byte stream. -use alacritty_terminal::vte::{Parser, Perform}; +use rio_vt::performer::parser::{Parser, Perform}; const OSC_CMD: &[u8] = b"133"; const OSC_VSCODE: &[u8] = b"633";