diff options
author | nyamatongwe <devnull@localhost> | 2012-02-29 21:36:12 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2012-02-29 21:36:12 +1100 |
commit | 423c8008eba2845a79d22b8f34c0dfb251afc13b (patch) | |
tree | 1e404a386f2c50af0c2c3c3c9f6ea850c1ee9410 /src | |
parent | 0531b486d248748ea14ffcdf9c6d0283b8652f4f (diff) | |
download | scintilla-mirror-423c8008eba2845a79d22b8f34c0dfb251afc13b.tar.gz |
Bug #3493503. Clip drawing operations to the painting area when using unbuffered
mode. This prevents parts of margin being drawn out of bounds.
Don't set clipping region when buffered mode is used, as it is not necessary.
From Marko Njezic.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 2bab6571d..bb5813686 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3532,6 +3532,9 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } PLATFORM_ASSERT(pixmapSelPattern->Initialised()); + if (!bufferedDraw) + surfaceWindow->SetClip(rcArea); + if (paintState != paintAbandoned) { PaintSelMargin(surfaceWindow, rcArea); @@ -3577,10 +3580,12 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // Remove selection margin from drawing area so text will not be drawn // on it in unbuffered mode. - PRectangle rcTextArea = rcClient; - rcTextArea.left = vs.fixedColumnWidth; - rcTextArea.right -= vs.rightMarginWidth; - surfaceWindow->SetClip(rcTextArea); + if (!bufferedDraw) { + PRectangle rcTextArea = rcClient; + rcTextArea.left = vs.fixedColumnWidth; + rcTextArea.right -= vs.rightMarginWidth; + surfaceWindow->SetClip(rcTextArea); + } // Loop on visible lines //double durLayout = 0.0; @@ -3665,7 +3670,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { if (bufferedDraw) { Point from(vs.fixedColumnWidth, 0); PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, - rcClient.right, yposScreen + vs.lineHeight); + rcClient.right - vs.rightMarginWidth, yposScreen + vs.lineHeight); surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); } |