From 6f51f5975920272f5f691d690107d15291a335f2 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 15 Aug 2024 16:05:53 +1000 Subject: Fix bug where double-click stopped working when system had been running for a long time. --- cocoa/ScintillaCocoa.mm | 2 +- doc/ScintillaHistory.html | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 223c9dac0..be71de367 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -2456,7 +2456,7 @@ void ScintillaCocoa::SetDocPointer(Document *document) { namespace { unsigned int TimeOfEvent(NSEvent *event) { - return static_cast(event.timestamp * 1000); + return static_cast(std::lround(event.timestamp * 1000.0) % 2000000000); } } diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 90e82cc41..a1abe6ccf 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -603,6 +603,9 @@ Add SCI_LINEINDENT and SCI_LINEDEDENT. Feature #1524. +
  • + Fix bug on Cocoa where double-click stopped working when system had been running for a long time. +
  • Release 5.5.1 -- cgit v1.2.3