From fba968c24fe513eb523ebd41c8d73b0cfaf36943 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 16 Apr 2018 14:26:30 +1000 Subject: Convert topLine from a screen line to a document line before using it to find a position. --- src/Editor.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 16348864d..0a2cf9c7c 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2561,7 +2561,8 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { pdoc->IncrementStyleClock(); } if (paintState == notPainting) { - if (mh.position < pdoc->LineStart(topLine)) { + const Sci::Line lineDocTop = pcs->DocFromDisplay(topLine); + if (mh.position < pdoc->LineStart(lineDocTop)) { // Styling performed before this view Redraw(); } else { -- cgit v1.2.3