Selaa lähdekoodia

LibLine: Clear the buffer after invalidating prior written data

Otherwise this would set m_chars_touched_in_the_middle to zero, which is
exactly the wrong thing to do.
AnotherTest 4 vuotta sitten
vanhempi
commit
cad7865ad1
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      Userland/Libraries/LibLine/Editor.cpp

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

@@ -316,8 +316,8 @@ void Editor::clear_line()
         fputc(0x8, stderr);
     fputs("\033[K", stderr);
     fflush(stderr);
-    m_buffer.clear();
     m_chars_touched_in_the_middle = buffer().size();
+    m_buffer.clear();
     m_cursor = 0;
     m_inline_search_cursor = m_cursor;
 }