X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b01abb82d79983cdc0e94f46e8f2ea99705aab2..bb996f289574defb0ae4339ae8e46ff3cf6fa54c:/src/stc/ScintillaWX.cpp diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 153329c124..9077933669 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -748,8 +748,16 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { if (paintState == paintAbandoned) { // Painting area was insufficient to cover new styling or brace - // highlight positions + // highlight positions. So trigger a new paint event that will + // repaint the whole window. + stc->Refresh(false); + +#if defined(__WXOSX__) + // On Mac we also need to finish the current paint to make sure that + // everything is on the screen that needs to be there between now and + // when the next paint event arrives. FullPaintDC(dc); +#endif } paintState = notPainting; } @@ -757,8 +765,8 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { // Force the whole window to be repainted void ScintillaWX::FullPaint() { - wxClientDC dc(stc); - FullPaintDC(&dc); + stc->Refresh(false); + stc->Update(); }