diff options
author | jakobst1n <jakob.stendahl@outlook.com> | 2024-06-12 00:36:52 +0200 |
---|---|---|
committer | jakobst1n <jakob.stendahl@outlook.com> | 2024-06-12 00:36:52 +0200 |
commit | 42c249ebe1cbfaac82b8fb349c34e6110d1df89f (patch) | |
tree | acf264985c0154c74c2c0b27da3e68ebac630078 | |
parent | 8ea7035581c4d5aa24e5f3995659171b3707556c (diff) | |
download | textgraph-42c249ebe1cbfaac82b8fb349c34e6110d1df89f.tar.gz textgraph-42c249ebe1cbfaac82b8fb349c34e6110d1df89f.zip |
Toggle cursor for filter mode
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/main.rs | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -11,4 +11,4 @@ watch some state in a sql table for a short while. The documentation is in the manual file `tg.1`. - +It is only tested with glibc and terminals with ansi escape code support. diff --git a/src/main.rs b/src/main.rs index 1d3ba02..3e827d9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,7 @@ use textgraph::graph::GraphBuilder; use textgraph::parseopts::{parseopts, OptsBuilder}; extern "C" fn handle_sigint(_sig: i32) { + print!("\x1b[?25h"); print!("\x1B[?1049l"); io::stdout().flush().unwrap(); std::process::exit(0); @@ -56,6 +57,7 @@ fn build_graph(x_values: &Vec<f64>, y_values: &Vec<f64>, opts: &OptsBuilder) -> fn filter(opts: OptsBuilder) { set_filter_signalhandler(); print!("\x1b[?1049h"); + print!("\x1b[?25l"); let mut x_values: Vec<f64> = Vec::new(); let mut y_values: Vec<f64> = Vec::new(); |