diff options
| -rw-r--r-- | src/Editor.cxx | 10 | ||||
| -rw-r--r-- | src/Editor.h | 2 | 
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);  | 
