diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-18 18:51:39 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-18 18:51:39 +0300 |
commit | 01894b3f4774f6fcb40c7799b51b61c073d9222f (patch) | |
tree | a0b0dcc1f43dc595e6d2954947d2fdf8c8c18ff0 /plugins/NewStory | |
parent | ec7ad35b1285d445aa9ae1a22fb1b583a62761eb (diff) |
fixes #4131 (NewStory: если водить мышкой поверх сообщения, которое редактируется, появляются глитчи)
Diffstat (limited to 'plugins/NewStory')
-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) { |