fix(mainview): prevent recursive event handler call error

This commit is contained in:
CJ van den Berg 2024-07-27 21:12:26 +02:00
parent c1d3394246
commit 262aeb1608

View file

@ -353,7 +353,7 @@ pub fn handle_editor_event(self: *Self, _: tp.pid_ref, m: tp.message) tp.result
if (text.len == 0)
return self.clear_auto_find(editor);
if (!self.is_last_match_text(text)) {
editor.find_in_buffer(text) catch return;
tp.self_pid().send(.{ "cmd", "find", .{text} }) catch return;
}
}
return;