瀏覽代碼

LibLine: Update the drawn cursor value when updating lazily

AnotherTest 4 年之前
父節點
當前提交
dd87b14f52
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Userland/Libraries/LibLine/Editor.cpp

+ 1 - 0
Userland/Libraries/LibLine/Editor.cpp

@@ -1271,6 +1271,7 @@ void Editor::refresh_display()
         m_refresh_needed = false;
         m_refresh_needed = false;
         m_cached_buffer_metrics = actual_rendered_string_metrics(buffer_view());
         m_cached_buffer_metrics = actual_rendered_string_metrics(buffer_view());
         m_chars_touched_in_the_middle = 0;
         m_chars_touched_in_the_middle = 0;
+        m_drawn_cursor = m_cursor;
         m_drawn_end_of_line_offset = m_buffer.size();
         m_drawn_end_of_line_offset = m_buffer.size();
 
 
         // No need to reposition the cursor, the cursor is already where it needs to be.
         // No need to reposition the cursor, the cursor is already where it needs to be.