From 5a754e4a418e767ea3355521fd04878197cfe7aa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 19 Feb 2023 17:50:00 +0300 Subject: fixes #2357 (NewStory: links in log/history should be clickable) --- plugins/NewStory/src/history_control.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/NewStory/src') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 2ce131b9a3..348f955c41 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -823,6 +823,9 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (data->caret != idx) data->EndEditItem(false); + auto *pItem = data->items[idx]; + MTextActivate(pItem->data, true); + if (wParam & MK_CONTROL) { SendMessage(hwnd, NSM_TOGGLEITEMS, idx, idx); SendMessage(hwnd, NSM_SETCARET, idx, TRUE); @@ -832,7 +835,6 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SendMessage(hwnd, NSM_SETCARET, idx, TRUE); } else { - auto *pItem = data->items[idx]; pt.y -= pItem->savedTop; if (pItem->isLink(pt)) { Utils_OpenUrlW(pItem->getWBuf()); @@ -847,6 +849,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SendMessage(hwnd, NSM_SELECTITEMS2, idx, idx); SendMessage(hwnd, NSM_SETCARET, idx, TRUE); } + MTextActivate(pItem->data, false); } SetFocus(hwnd); -- cgit v1.2.3