Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix being unable to input a whitespace character in collab channels filter (#33318)

Kirill Bulatov39dc4b9040af
diff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rs
index d45ce2f88dc..6501d3a5664 100644
--- a/crates/collab_ui/src/collab_panel.rs
+++ b/crates/collab_ui/src/collab_panel.rs
@@ -1645,6 +1645,10 @@ impl CollabPanel {
self.channel_name_editor.update(cx, |editor, cx| {
editor.insert(" ", window, cx);
});
+ } else if self.filter_editor.focus_handle(cx).is_focused(window) {
+ self.filter_editor.update(cx, |editor, cx| {
+ editor.insert(" ", window, cx);
+ });
}
}
@@ -2045,7 +2049,9 @@ impl CollabPanel {
dispatch_context.add("CollabPanel");
dispatch_context.add("menu");
- let identifier = if self.channel_name_editor.focus_handle(cx).is_focused(window) {
+ let identifier = if self.channel_name_editor.focus_handle(cx).is_focused(window)
+ || self.filter_editor.focus_handle(cx).is_focused(window)
+ {
"editing"
} else {
"not_editing"
@@ -3031,7 +3037,7 @@ impl Render for CollabPanel {
.on_action(cx.listener(CollabPanel::start_move_selected_channel))
.on_action(cx.listener(CollabPanel::move_channel_up))
.on_action(cx.listener(CollabPanel::move_channel_down))
- .track_focus(&self.focus_handle(cx))
+ .track_focus(&self.focus_handle)
.size_full()
.child(if self.user_store.read(cx).current_user().is_none() {
self.render_signed_out(cx)