瀏覽代碼

GTextEditor: Scroll the cursor into view before updating it.

Andreas Kling 6 年之前
父節點
當前提交
60c1ab5fbe
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      LibGUI/GTextEditor.cpp

+ 1 - 1
LibGUI/GTextEditor.cpp

@@ -246,8 +246,8 @@ void GTextEditor::set_cursor(int line, int column)
     update_cursor();
     m_cursor = GTextPosition(line, column);
     m_cursor_state = true;
-    update_cursor();
     scroll_cursor_into_view();
+    update_cursor();
     if (on_cursor_change)
         on_cursor_change(*this);
 }