From 42c249ebe1cbfaac82b8fb349c34e6110d1df89f Mon Sep 17 00:00:00 2001 From: jakobst1n Date: Wed, 12 Jun 2024 00:36:52 +0200 Subject: Toggle cursor for filter mode --- README.md | 2 +- src/main.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cc8bac4..6f5046c 100644 --- a/README.md +++ b/README.md @@ -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, y_values: &Vec, opts: &OptsBuilder) -> fn filter(opts: OptsBuilder) { set_filter_signalhandler(); print!("\x1b[?1049h"); + print!("\x1b[?25l"); let mut x_values: Vec = Vec::new(); let mut y_values: Vec = Vec::new(); -- cgit v1.2.3