diff options
author | Marko Njezic <unknown> | 2012-06-27 13:29:27 +0200 |
---|---|---|
committer | Marko Njezic <unknown> | 2012-06-27 13:29:27 +0200 |
commit | 3c44b38e1edd7e0cbe644d2a9ff4a29e0867c3eb (patch) | |
tree | 4ce93f369ccf10575613cac9e016a26f049056fc /src/Editor.cxx | |
parent | 783ccd1c62faa4d50b88576f55231045f320dd79 (diff) | |
download | scintilla-mirror-3c44b38e1edd7e0cbe644d2a9ff4a29e0867c3eb.tar.gz |
Fix screen redraw issues introduced with change set 4199.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index e88458551..2b0221dd8 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -663,7 +663,8 @@ PRectangle Editor::RectangleFromRange(int start, int end) { int maxLine = cs.DisplayFromDoc(lineDocMax) + cs.GetHeight(lineDocMax) - 1; PRectangle rcClient = GetTextRectangle(); PRectangle rc; - rc.left = vs.fixedColumnWidth; + const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0; + rc.left = vs.fixedColumnWidth - leftTextOverlap; rc.top = (minLine - topLine) * vs.lineHeight; if (rc.top < 0) rc.top = 0; @@ -3501,8 +3502,12 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); + // Allow text at start of line to overlap 1 pixel into the margin as this displays + // serifs and italic stems for aliased text. + const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0; + // Do the painting - if (rcArea.right > vs.fixedColumnWidth) { + if (rcArea.right > vs.fixedColumnWidth - leftTextOverlap) { Surface *surface = surfaceWindow; if (bufferedDraw) { @@ -3523,10 +3528,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { rcTextArea.left = vs.fixedColumnWidth; rcTextArea.right -= vs.rightMarginWidth; - // Allow text at start of line to overlap 1 pixel into the margin as this displays - // serifs and italic stems for aliased text. - const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0; - // Remove selection margin from drawing area so text will not be drawn // on it in unbuffered mode. if (!bufferedDraw) { |