feat: hide_mouse_cursor_when_typing config option

This commit is contained in:
ProspectPyxis authored and Wez Furlong committed 2023-01-12 08:08:42 -08:00
1 parent b86f5365a1
commit 087a3cef9a
2 files changed
+11 -2

No files matched your search

+5
View File
@@ -581,6 +581,11 @@ pub struct Config {
#[dynamic(default = "linear_ease")]
pub text_blink_rapid_ease_out: EasingFunction,
/// If true, the mouse cursor will be hidden while typing.
/// This option is true by default.
#[dynamic(default = "default_true")]
pub hide_mouse_cursor_when_typing: bool,
/// If non-zero, specifies the period (in seconds) at which various
/// statistics are logged. Note that there is a minimum period of
/// 10 seconds.
+6 -2
View File
@@ -391,7 +391,9 @@ impl super::TermWindow {
{
self.maybe_scroll_to_bottom_for_input(&pane);
}
context.set_cursor(None);
if self.config.hide_mouse_cursor_when_typing {
context.set_cursor(None);
}
if !keycode.is_modifier() {
context.invalidate();
}
@@ -646,7 +648,9 @@ impl super::TermWindow {
{
self.maybe_scroll_to_bottom_for_input(&pane);
}
context.set_cursor(None);
if self.config.hide_mouse_cursor_when_typing {
context.set_cursor(None);
}
if !key.is_modifier() {
context.invalidate();
}