LibLine: Add support for user-controlled masking

This commit is contained in:
Ali Mohammad Pur 2022-05-02 16:10:42 +04:30 committed by Linus Groh
commit 78dc77f7e4
Notes: sideshowbarker 2024-07-17 10:39:33 +09:00
5 changed files with 212 additions and 59 deletions

View file

@ -345,8 +345,8 @@ void Editor::enter_search()
// Manually cleanup the search line.
OutputFileStream stderr_stream { stderr };
reposition_cursor(stderr_stream);
auto search_metrics = actual_rendered_string_metrics(search_string);
auto metrics = actual_rendered_string_metrics(search_prompt);
auto search_metrics = actual_rendered_string_metrics(search_string, {});
auto metrics = actual_rendered_string_metrics(search_prompt, {});
VT::clear_lines(0, metrics.lines_with_addition(search_metrics, m_num_columns) + search_end_row - m_origin_row - 1, stderr_stream);
reposition_cursor(stderr_stream);