diff options
author | George Hazan <george.hazan@gmail.com> | 2024-03-24 11:39:39 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-03-24 11:39:39 +0300 |
commit | a9ef9d6a8d62984b7e39cb8be0af3a5f6403ab82 (patch) | |
tree | ace32f07d83a031ca4fea0586498a3c0e9ee9ef2 /plugins/NewStory/src | |
parent | 8c7deb5f87e64b33286f5a26a61960b9017d74b8 (diff) |
fixes #4289 completely
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r-- | plugins/NewStory/src/history_control.cpp | 4 | ||||
-rw-r--r-- | plugins/NewStory/src/utils.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 3c1ffd9e4c..4c9b7fbb48 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -1361,7 +1361,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM auto *pItem = data->LoadItem(idx);
litehtml::position::vector redraw_boxes;
- pItem->m_doc->on_lbutton_down(pt.x, pt.y, pt.x, pt.y, redraw_boxes);
+ pItem->m_doc->on_lbutton_down(pt.x - pItem->leftOffset, pt.y - pItem->savedTop, pt.x, pt.y, redraw_boxes);
if (wParam & MK_CONTROL) {
data->ToggleSelection(idx, idx);
@@ -1390,7 +1390,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM auto *pItem = data->LoadItem(idx);
litehtml::position::vector redraw_boxes;
- pItem->m_doc->on_lbutton_up(pt.x, pt.y, pt.x, pt.y, redraw_boxes);
+ pItem->m_doc->on_lbutton_up(pt.x - pItem->leftOffset, pt.y - pItem->savedTop, pt.x, pt.y, redraw_boxes);
}
break;
diff --git a/plugins/NewStory/src/utils.cpp b/plugins/NewStory/src/utils.cpp index 656abcfbea..f9bb3cd252 100644 --- a/plugins/NewStory/src/utils.cpp +++ b/plugins/NewStory/src/utils.cpp @@ -132,7 +132,7 @@ static int DetectUrl(const wchar_t *text) if (!((text[i] >= '0' && text[i] <= '9') || iswalpha(text[i])))
break;
- if (i <= 0 || memcmp(text + i, "://", 3))
+ if (i <= 0 || wcsncmp(text + i, L"://", 3))
return 0;
i += countNoWhitespace(text + i);
|