diff options
author | Mataes <mataes2007@gmail.com> | 2020-04-23 21:13:04 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2020-04-23 21:13:04 +0300 |
commit | 89853e9b3720c63fcc9a84967509795ad42d811d (patch) | |
tree | 000789aec8b5e27742ab383f2ee6d83cb306688c | |
parent | 3ef977ed7d0811401a0b7bff64711bdb5837debd (diff) | |
parent | 579335fcd5bfdcf3c54e8d06f181b00bde3efa58 (diff) |
Merge branch 'master' of https://github.com/miranda-ng/miranda-ng
-rw-r--r-- | plugins/NewStory/src/history_control.cpp | 8 | ||||
-rw-r--r-- | plugins/NewStory/src/history_control.h | 1 | ||||
-rw-r--r-- | plugins/NewStory/src/history_log.cpp | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index bfebfb4600..6d7f6a339f 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -153,15 +153,15 @@ static void FixScrollPosition(HWND hwnd, NewstoryListData *data) data->cachedMaxTopPixel = (windowHeight < tmp) ? windowHeight - tmp : 0; } - if (data->scrollTopItem < 0) { + if (data->scrollTopItem < 0) data->scrollTopItem = 0; - } if ((data->scrollTopItem > data->cachedMaxTopItem) || ((data->scrollTopItem == data->cachedMaxTopItem) && (data->scrollTopPixel < data->cachedMaxTopPixel))) { data->scrollTopItem = data->cachedMaxTopItem; data->scrollTopPixel = data->cachedMaxTopPixel; } + RecalcScrollBar(hwnd, data); } @@ -613,6 +613,10 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM } return TRUE; + case NSM_SEEKEND: + SendMessage(hwnd, NSM_SETCARET, data->items.getCount() - 1, 1); + break; + case NSM_COPY: { CMStringW res; diff --git a/plugins/NewStory/src/history_control.h b/plugins/NewStory/src/history_control.h index 934da14054..80a95047ac 100644 --- a/plugins/NewStory/src/history_control.h +++ b/plugins/NewStory/src/history_control.h @@ -71,6 +71,7 @@ enum NSM_GETCOUNT, // + NSM_SEEKEND, NSM_SEEKTIME, NSM_LAST diff --git a/plugins/NewStory/src/history_log.cpp b/plugins/NewStory/src/history_log.cpp index 0fb7b1134b..1bcd86ab24 100644 --- a/plugins/NewStory/src/history_log.cpp +++ b/plugins/NewStory/src/history_log.cpp @@ -73,6 +73,7 @@ public: void ScrollToBottom() override { + ::SendMessage(m_hwnd, NSM_SEEKEND, 0, 0); } }; |