summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-19 17:50:00 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-19 17:50:00 +0300
commit5a754e4a418e767ea3355521fd04878197cfe7aa (patch)
treeacd2649ba6fec60d626424a28c0ac0b239742eb4 /plugins/NewStory/src
parent756cda6094c7e3e24a29323867b070b988dfaf1c (diff)
fixes #2357 (NewStory: links in log/history should be clickable)
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r--plugins/NewStory/src/history_control.cpp5
1 files changed, 4 insertions, 1 deletions
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);