aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/Cargo.toml
diff options
context:
space:
mode:
authorMichael Davis2023-03-05 18:06:12 +0000
committerBlaž Hrastnik2023-03-08 01:49:32 +0000
commit3d850247177f61601296fe5b1cdada8819137783 (patch)
tree6c9639cea8fba74e0d8a61d34a49e5ee19d24cbe /helix-tui/Cargo.toml
parent48b6aa9a699df0680a6d31e9611ebd1ca9909de4 (diff)
Move terminal claim/restore code to helix-tui
This moves the `Application::claim_term` and `helix-term::application::restore_term` functions into the helix-tui crate. How the terminal should be claimed and restored is a TUI concern and is implemented differently through different TUI backends. This cleans out a lot of crossterm and TUI code in Application and makes it easier to modify claim/restore based on information we query from the terminal host. The child commit will take advantage of this to cache the check for whether the host terminal supports the keyboard enhancement protocol. Without this change, caching that information takes much more code which is not easily reusable for anything else. The code to restore the terminal is somewhat duplicated by this patch: we want to restore the terminal in cases of panics. Panic handler hooks must live for `'static` and the Application's terminal does not.
Diffstat (limited to 'helix-tui/Cargo.toml')
-rw-r--r--helix-tui/Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-tui/Cargo.toml b/helix-tui/Cargo.toml
index ccd016f5..3ca7e044 100644
--- a/helix-tui/Cargo.toml
+++ b/helix-tui/Cargo.toml
@@ -22,5 +22,6 @@ unicode-segmentation = "1.10"
crossterm = { version = "0.26", optional = true }
termini = "0.1"
serde = { version = "1", "optional" = true, features = ["derive"]}
+log = "~0.4"
helix-view = { version = "0.6", path = "../helix-view", features = ["term"] }
helix-core = { version = "0.6", path = "../helix-core" }