diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/NewStory/src/history_control.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 295a49a4e2..2e7f799833 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -247,6 +247,7 @@ void NewstoryListData::BeginEditItem() SendMessage(hwndEditBox, EM_SETMARGINS, EC_RIGHTMARGIN, 100); ShowWindow(hwndEditBox, SW_SHOW); SetFocus(hwndEditBox); + SetForegroundWindow(hwndEditBox); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -1133,9 +1134,10 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int height = rc.bottom - rc.top; int width = rc.right - rc.left; int top = data->scrollTopPixel; - idx = data->scrollTopItem; - while ((top < height) && (idx < data->totalCount)) - top += data->PaintItem(hdc, data->LoadItem(idx++), top, width, true); + + for (idx = data->scrollTopItem; top < height && idx < data->totalCount; idx++) + top += data->PaintItem(hdc, data->LoadItem(idx), top, width, !data->hwndEditBox || data->caret != idx); + data->cachedMaxDrawnItem = idx; if (top <= height) { |