diff options
-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);
|