Rework inline assistant

This commit is contained in:
Antonio Scandurra 2023-08-25 11:39:27 +02:00
parent b6035ee6a6
commit c1bd035875
14 changed files with 600 additions and 438 deletions

View file

@ -8209,7 +8209,7 @@ impl View for Editor {
"Editor"
}
fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
fn focus_in(&mut self, focused: AnyViewHandle, cx: &mut ViewContext<Self>) {
if cx.is_self_focused() {
let focused_event = EditorFocused(cx.handle());
cx.emit(Event::Focused);
@ -8217,7 +8217,7 @@ impl View for Editor {
}
if let Some(rename) = self.pending_rename.as_ref() {
cx.focus(&rename.editor);
} else {
} else if cx.is_self_focused() || !focused.is::<Editor>() {
if !self.focused {
self.blink_manager.update(cx, BlinkManager::enable);
}