summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/NewStory/src/history_control.cpp6
1 files changed, 6 insertions, 0 deletions
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;