on master help sign in
fix: Make sure to actually use idle_timeout config value for the timers
commita930f99179c4e0706254b243a4c0672089cb59ed authorBlaž Hrastnik <blaz@mxxn.io> dateSun 10 Oct 2021, 22:39 (5 years ago) parentf8f63c5
1 file changed+2−2
helix-view/src/editor.rs+2−2
helix-view/src/editor.rs+2−2
@@ -141,7 +141,7 @@ impl Editor {
141141 registers: Registers::default(),
142142 clipboard_provider: get_clipboard_provider(),
143143 status_msg: None,
144− idle_timer: Box::pin(sleep(Duration::from_millis(500))),
144+ idle_timer: Box::pin(sleep(config.idle_timeout)),
145145 config,
146146 }
147147 }
@@ -156,7 +156,7 @@ impl Editor {
156156 pub fn reset_idle_timer(&mut self) {
157157 self.idle_timer
158158 .as_mut()
159− .reset(Instant::now() + Duration::from_millis(500));
159+ .reset(Instant::now() + self.config.idle_timeout);
160160 }
161161
162162 pub fn clear_status(&mut self) {