aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMarko Njezic <devnull@localhost>2012-06-27 13:29:27 +0200
committerMarko Njezic <devnull@localhost>2012-06-27 13:29:27 +0200
commitf6a65ea21c273c9c78fd749c20dc2c9901e59ca4 (patch)
treef72852c8cec01e0a28feb0078c964e14e81d505f /src
parente541383a52ed6bc5ec5408e1b4b996466c060931 (diff)
downloadscintilla-mirror-f6a65ea21c273c9c78fd749c20dc2c9901e59ca4.tar.gz
Fix screen redraw issues introduced with change set 4199.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx13
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) {