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