Do not show signature help when editor is not focused (#15080)

Kirill Bulatov created

Show the help again, if it was not dismissed and the editor regains
focus.

Release Notes:

- N/A

Change summary

crates/editor/src/element.rs | 3 +++
1 file changed, 3 insertions(+)

Detailed changes

crates/editor/src/element.rs 🔗

@@ -2805,6 +2805,9 @@ impl EditorElement {
         em_width: Pixels,
         cx: &mut WindowContext,
     ) {
+        if !self.editor.focus_handle(cx).is_focused(cx) {
+            return;
+        }
         let Some(newest_selection_head) = newest_selection_head else {
             return;
         };