From d54e3a3ac23da0b6fce2c7fa55cbe22a05cc2aef Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 16 Mar 2013 21:00:54 +1100 Subject: Fix margin drawing with Cocoa when always-visible scrollbars turned on. --- src/Editor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index e79d8383a..f63ceda43 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1819,6 +1819,8 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { PRectangle rcSelMargin = rcMargin; rcSelMargin.right = rcMargin.left; + if (rcSelMargin.bottom < rc.bottom) + rcSelMargin.bottom = rc.bottom; for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) { if (vs.ms[margin].width > 0) { @@ -1886,7 +1888,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, SC_MARKNUM_FOLDER); - while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) { + while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rc.bottom) { PLATFORM_ASSERT(visibleLine < cs.LinesDisplayed()); int lineDoc = cs.DocFromDisplay(visibleLine); -- cgit v1.2.3