aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-10-10 13:39:47 +0000
committerBlaž Hrastnik2021-10-10 13:39:47 +0000
commita930f99179c4e0706254b243a4c0672089cb59ed (patch)
tree36f48ed89ba6dfb0009663fbf2cb8ca313e87959 /helix-view
parentf8f63c55081ee966c7cb2b84139c25c6301b5fff (diff)
fix: Make sure to actually use idle_timeout config value for the timers
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/editor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 5af6dbf3..d0ea6653 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -141,7 +141,7 @@ impl Editor {
registers: Registers::default(),
clipboard_provider: get_clipboard_provider(),
status_msg: None,
- idle_timer: Box::pin(sleep(Duration::from_millis(500))),
+ idle_timer: Box::pin(sleep(config.idle_timeout)),
config,
}
}
@@ -156,7 +156,7 @@ impl Editor {
pub fn reset_idle_timer(&mut self) {
self.idle_timer
.as_mut()
- .reset(Instant::now() + Duration::from_millis(500));
+ .reset(Instant::now() + self.config.idle_timeout);
}
pub fn clear_status(&mut self) {