1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-22 04:41:34 +03:00

use duration_since per @jsgf

This commit is contained in:
Wez Furlong 2019-12-31 15:38:57 -08:00
parent ecc6840061
commit 253c36bf8c

View File

@ -223,7 +223,7 @@ impl WindowCallbacks for TermWindow {
WMEK::Press(_) => {
if let Some(focused) = self.focused.as_ref() {
let now = Instant::now();
if now - *focused <= Duration::from_millis(200) {
if now.duration_since(*focused) <= Duration::from_millis(200) {
log::trace!("discard mouse click because it focused the window");
return;
}