Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Small fixes to task modal & long commands (#8974)
Kirill Bulatovae5ec9224c77
diff --git a/crates/picker/src/picker.rs b/crates/picker/src/picker.rsindex 6ff9f62e0f0..8d6437c5dc0 100644--- a/crates/picker/src/picker.rs+++ b/crates/picker/src/picker.rs@@ -1,5 +1,5 @@use anyhow::Result;-use editor::Editor;+use editor::{scroll::Autoscroll, Editor};use gpui::{div, list, prelude::*, uniform_list, AnyElement, AppContext, ClickEvent, DismissEvent,EventEmitter, FocusHandle, FocusableView, Length, ListState, Render, Task,@@ -334,8 +334,13 @@ impl<D: PickerDelegate> Picker<D> {}pub fn set_query(&self, query: impl Into<Arc<str>>, cx: &mut ViewContext<Self>) {- self.editor- .update(cx, |editor, cx| editor.set_text(query, cx));+ self.editor.update(cx, |editor, cx| {+ editor.set_text(query, cx);+ let editor_offset = editor.buffer().read(cx).len(cx);+ editor.change_selections(Some(Autoscroll::Next), cx, |s| {+ s.select_ranges(Some(editor_offset..editor_offset))+ });+ });}fn scroll_to_item_index(&mut self, ix: usize) {diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rsindex 342d4c6cc20..a84b02350ef 100644--- a/crates/terminal/src/terminal.rs+++ b/crates/terminal/src/terminal.rs@@ -1365,7 +1365,13 @@ impl Terminal {pub fn title(&self, truncate: bool) -> String {const MAX_CHARS: usize = 25;match &self.task {- Some(task_state) => truncate_and_trailoff(&task_state.label, MAX_CHARS),+ Some(task_state) => {+ if truncate {+ truncate_and_trailoff(&task_state.label, MAX_CHARS)+ } else {+ task_state.label.clone()+ }+ }None => self.foreground_process_info.as_ref()