on master help sign in
fix: Make sure to actually use idle_timeout config value for the timers
a930f99Blaž Hrastnik
helix-view/src/editor.rs+2−2
@@ -141,7 +141,7 @@ impl Editor {
141 registers: Registers::default(),
141 registers: Registers::default(),
142 clipboard_provider: get_clipboard_provider(),
142 clipboard_provider: get_clipboard_provider(),
143 status_msg: None,
143 status_msg: None,
144− idle_timer: Box::pin(sleep(Duration::from_millis(500))),
144+ idle_timer: Box::pin(sleep(config.idle_timeout)),
145 config,
145 config,
146 }
146 }
147 }
147 }
@@ -156,7 +156,7 @@ impl Editor {
156 pub fn reset_idle_timer(&mut self) {
156 pub fn reset_idle_timer(&mut self) {
157 self.idle_timer
157 self.idle_timer
158 .as_mut()
158 .as_mut()
159− .reset(Instant::now() + Duration::from_millis(500));
159+ .reset(Instant::now() + self.config.idle_timeout);
160 }
160 }
161
161
162 pub fn clear_status(&mut self) {
162 pub fn clear_status(&mut self) {