aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-10-29 23:48:10 +0000
committernyamatongwe <devnull@localhost>2005-10-29 23:48:10 +0000
commitf12afccae7dfa0e52ac1954a2fcea64afaa7a248 (patch)
tree4d46734123172bf60e0369edfae8130d5baa93db /src
parent2b5d958fb2427d2fc53cf1da4e048daa04d98507 (diff)
downloadscintilla-mirror-f12afccae7dfa0e52ac1954a2fcea64afaa7a248.tar.gz
Only redraw line affected when changing markers.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx10
-rw-r--r--src/Editor.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 2b100fd49..8ebdbd9ae 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -875,13 +875,19 @@ void Editor::Redraw() {
//wMain.InvalidateAll();
}
-void Editor::RedrawSelMargin() {
+void Editor::RedrawSelMargin(int line) {
if (!AbandonPaint()) {
if (vs.maskInLine) {
Redraw();
} else {
PRectangle rcSelMargin = GetClientRectangle();
rcSelMargin.right = vs.fixedColumnWidth;
+ if (line != -1) {
+ int position = pdoc->LineStart(line);
+ PRectangle rcLine = RectangleFromRange(position, position);
+ rcSelMargin.top = rcLine.top;
+ rcSelMargin.bottom = rcLine.bottom;
+ }
wMain.InvalidateRectangle(rcSelMargin);
}
}
@@ -3742,7 +3748,7 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) {
if (mh.modificationType & SC_MOD_CHANGEMARKER) {
if (paintState == notPainting) {
- RedrawSelMargin();
+ RedrawSelMargin(mh.line);
}
}
diff --git a/src/Editor.h b/src/Editor.h
index e69778ab7..0db5cb1c3 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -342,7 +342,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool AbandonPaint();
void RedrawRect(PRectangle rc);
void Redraw();
- void RedrawSelMargin();
+ void RedrawSelMargin(int line=-1);
PRectangle RectangleFromRange(int start, int end);
void InvalidateRange(int start, int end);