aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index d081c989e..4c35093db 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1846,15 +1846,11 @@ void Editor::PaintSelMargin(Surface *surfaceWindow, const PRectangle &rc) {
void Editor::RefreshPixMaps(Surface *surfaceWindow) {
view.RefreshPixMaps(surfaceWindow, vs);
marginView.RefreshPixMaps(surfaceWindow, vs);
- if (view.bufferedDraw) {
+ if (view.bufferedDraw && !(view.pixmapLine && marginView.pixmapSelMargin)) {
const PRectangle rcClient = GetClientRectangle();
- if (!view.pixmapLine) {
- view.pixmapLine = surfaceWindow->AllocatePixMap(static_cast<int>(rcClient.Width()), vs.lineHeight);
- }
- if (!marginView.pixmapSelMargin) {
- marginView.pixmapSelMargin = surfaceWindow->AllocatePixMap(vs.fixedColumnWidth,
- static_cast<int>(rcClient.Height()));
- }
+ view.pixmapLine = surfaceWindow->AllocatePixMap(static_cast<int>(rcClient.Width()), vs.lineHeight);
+ marginView.pixmapSelMargin = surfaceWindow->AllocatePixMap(vs.fixedColumnWidth,
+ static_cast<int>(rcClient.Height()));
}
}