diff options
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | src/Editor.cxx | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 4d3c73774..5b636af5d 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -616,6 +616,10 @@ <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16373">Notepad++ Pull Request #16373</a>. </li> <li> + Fix crash during painting when scroll bars changed. + <a href="https://sourceforge.net/p/scintilla/bugs/2481/">Bug #2481</a>. + </li> + <li> On GTK, reset vertical scroll bar synchronously in SCI_SETDOCPOINTER to fix bug where scroll position not restored in non-wrap mode. <a href="https://sourceforge.net/p/scintilla/bugs/2416/">Bug #2416</a>. diff --git a/src/Editor.cxx b/src/Editor.cxx index d941612b1..d081c989e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1868,7 +1868,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { RefreshStyleData(); if (paintState == PaintState::abandoned) return; // Scroll bars may have changed so need redraw - RefreshPixMaps(surfaceWindow); paintAbandonedByStyling = false; @@ -1880,7 +1879,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { if (NotifyUpdateUI()) { RefreshStyleData(); - RefreshPixMaps(surfaceWindow); } // Wrap the visible lines if needed. @@ -1890,9 +1888,10 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { if (AbandonPaint()) { return; } - RefreshPixMaps(surfaceWindow); // In case pixmaps invalidated by scrollbar change } + RefreshPixMaps(surfaceWindow); + if (!marginView.pixmapSelPattern->Initialised()) { // When Direct2D is used, pixmap creation may fail with D2DERR_RECREATE_TARGET so // abandon this paint to avoid further failures. |