|
@@ -223,6 +223,8 @@ void Editor::enter_search()
|
|
m_pre_search_buffer.append(code_point);
|
|
m_pre_search_buffer.append(code_point);
|
|
m_pre_search_cursor = m_cursor;
|
|
m_pre_search_cursor = m_cursor;
|
|
|
|
|
|
|
|
+ ensure_free_lines_from_origin(1 + num_lines());
|
|
|
|
+
|
|
// Disable our own notifier so as to avoid interfering with the search editor.
|
|
// Disable our own notifier so as to avoid interfering with the search editor.
|
|
m_notifier->set_enabled(false);
|
|
m_notifier->set_enabled(false);
|
|
|
|
|
|
@@ -310,9 +312,6 @@ void Editor::enter_search()
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
|
|
- fprintf(stderr, "\n");
|
|
|
|
- fflush(stderr);
|
|
|
|
-
|
|
|
|
auto search_prompt = "\x1b[32msearch:\x1b[0m ";
|
|
auto search_prompt = "\x1b[32msearch:\x1b[0m ";
|
|
|
|
|
|
// While the search editor is active, we do not want editing events.
|
|
// While the search editor is active, we do not want editing events.
|
|
@@ -349,6 +348,10 @@ void Editor::enter_search()
|
|
|
|
|
|
reposition_cursor();
|
|
reposition_cursor();
|
|
|
|
|
|
|
|
+ m_refresh_needed = true;
|
|
|
|
+ m_cached_prompt_valid = false;
|
|
|
|
+ m_chars_touched_in_the_middle = 1;
|
|
|
|
+
|
|
if (!m_reset_buffer_on_search_end || search_metrics.total_length == 0) {
|
|
if (!m_reset_buffer_on_search_end || search_metrics.total_length == 0) {
|
|
// If the entry was empty, or we purposely quit without a newline,
|
|
// If the entry was empty, or we purposely quit without a newline,
|
|
// do not return anything; instead, just end the search.
|
|
// do not return anything; instead, just end the search.
|