From 7c0f7e47299744f043ffb02ea22b538bc18af275 Mon Sep 17 00:00:00 2001 From: Mataes Date: Fri, 24 Apr 2020 13:15:53 +0300 Subject: newstory: fixed work of calendar button --- plugins/NewStory/src/history_control.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 6d7f6a339f..56e814718d 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -606,9 +606,15 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM for (int i = 0; i < eventCount; i++) { auto *item = data->items.get(i, ELM_NOTHING); if (item->dbe.timestamp >= wParam) { + SendMessage(hwnd, NSM_SELECTITEMS2, i, i); SendMessage(hwnd, NSM_SETCARET, i, TRUE); break; } + if (i == eventCount - 1) + { + SendMessage(hwnd, NSM_SELECTITEMS2, i, i); + SendMessage(hwnd, NSM_SETCARET, i, TRUE); + } } } return TRUE; -- cgit v1.2.3