LibLine: Update inline search cursor after kill_line (^U) command

After the kill_line (^U) command was used, searching backwards in the
history would still filter based on the text previous to the deletion.

Update the inline search cursor like already done in other internal
functions, so the text used for search is the current one.
This commit is contained in:
Nícolas F. R. A. Prado 2022-02-25 23:29:40 -05:00 committed by Ali Mohammad Pur
parent 5ce7c67e44
commit 9e81c2dc83
Notes: sideshowbarker 2024-07-17 18:11:29 +09:00

View file

@ -170,6 +170,7 @@ void Editor::kill_line()
for (size_t i = 0; i < m_cursor; ++i)
remove_at_index(0);
m_cursor = 0;
m_inline_search_cursor = m_cursor;
m_refresh_needed = true;
}