aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 67c0676..6c515c6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -265,4 +265,13 @@ pub trait Textmode: private::Output {
self.write(b"\x1b[27m");
}
}
+
+ /// Sets whether the cursor should be visible.
+ fn hide_cursor(&mut self, hide: bool) {
+ if hide {
+ self.write(b"\x1b[?25l");
+ } else {
+ self.write(b"\x1b[?25h");
+ }
+ }
}