diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 1f6ac5b34..a41a5e24a 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2646,8 +2646,8 @@ void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, Lin rcPlace.left = xEol + xStart + virtualSpace; rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; } else { - // draw left of the right text margin, to avoid clipping by the current clip rect - rcPlace.right = rcLine.right - vs.rightMarginWidth; + // rcLine is clipped to text area + rcPlace.right = rcLine.right; rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; } DrawWrapMarker(surface, rcPlace, true, wrapColour); @@ -3257,8 +3257,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis } // Draw any translucent whole line states - rcSegment.left = 0; - rcSegment.right = rcLine.right - 1; + rcSegment = rcLine; if (caret.active && vsDraw.showCaretLineBackground && ll->containsCaret) { SimpleAlphaRectangle(surface, rcSegment, vsDraw.caretLineBackground, vsDraw.caretLineAlpha); } @@ -3590,12 +3589,13 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { posCaret = posDrag; int lineCaret = pdoc->LineFromPosition(posCaret.Position()); + PRectangle rcTextArea = rcClient; + rcTextArea.left = vs.fixedColumnWidth; + rcTextArea.right -= vs.rightMarginWidth; + // Remove selection margin from drawing area so text will not be drawn // on it in unbuffered mode. if (!bufferedDraw) { - PRectangle rcTextArea = rcClient; - rcTextArea.left = vs.fixedColumnWidth; - rcTextArea.right -= vs.rightMarginWidth; surfaceWindow->SetClip(rcTextArea); } @@ -3633,7 +3633,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { GetHotSpotRange(ll->hsStart, ll->hsEnd); - PRectangle rcLine = rcClient; + PRectangle rcLine = rcTextArea; rcLine.top = ypos; rcLine.bottom = ypos + vs.lineHeight; @@ -3707,7 +3707,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // Right column limit indicator PRectangle rcBeyondEOF = rcClient; rcBeyondEOF.left = vs.fixedColumnWidth; - rcBeyondEOF.right = rcBeyondEOF.right; + rcBeyondEOF.right = rcBeyondEOF.right - vs.rightMarginWidth; rcBeyondEOF.top = (cs.LinesDisplayed() - topLine) * vs.lineHeight; if (rcBeyondEOF.top < rcBeyondEOF.bottom) { surfaceWindow->FillRectangle(rcBeyondEOF, vs.styles[STYLE_DEFAULT].back); |