From b2684ec9cbc58990121d859fd4aa3e9ba105c71f Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 22 Mar 2003 10:13:36 +0000 Subject: Moved invalidation code around a bit to try to optimize on GTK+ 2.x. --- src/Editor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 07db2404f..ae096d50f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -901,9 +901,9 @@ int Editor::MovePositionTo(int newPos, bool extend, bool ensureVisible) { } else { SetEmptySelection(newPos); } + ShowCaretAtCurrentPosition(); if (ensureVisible) EnsureCaretVisible(); - ShowCaretAtCurrentPosition(); NotifyMove(newPos); return 0; } @@ -1149,9 +1149,9 @@ void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { } newTopLine = Platform::Clamp(newTopLine, 0, MaxScrollPos()); if (newTopLine != topLine) { + Redraw(); SetTopLine(newTopLine); SetVerticalScrollPos(); - Redraw(); } } -- cgit v1.2.3