BlueGit

ict rusty-teams

fix(app): selection highlight follows the drag

gpui-base updates the window selection on mouse move but notifies no view, so the window only redrew on release. A demo toast tick hid this. Message text now asks for a frame on each drag move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-07 · 7 weeks ago

Hash
4a4c85f313b1a62435987f2bdf4af52d035b1425
Parent
0ff1db96
1 file changed +6 −0
crates/app/src/render/selectable.rs +6 −0
@@ -188,6 +188,12 @@ impl Element for SelectableRichText {
188 188 CursorStyle::IBeam
189 189 };
190 190 window.set_cursor_style(cursor, hitbox);
191 // gpui-base updates the selection on drag without notifying a view, so nothing redraws.
192 window.on_mouse_event(|event: &MouseMoveEvent, phase, window, _| {
193 if phase.bubble() && event.pressed_button == Some(MouseButton::Left) {
194 window.refresh();
195 }
196 });
191 197 if self.links.is_empty() {
192 198 return;
193 199 }
@@ -188,6 +188,12 @@ impl Element for SelectableRichText {
188 CursorStyle::IBeam
188 CursorStyle::IBeam
189 };
189 };
190 window.set_cursor_style(cursor, hitbox);
190 window.set_cursor_style(cursor, hitbox);
191 // gpui-base updates the selection on drag without notifying a view, so nothing redraws.
192 window.on_mouse_event(|event: &MouseMoveEvent, phase, window, _| {
193 if phase.bubble() && event.pressed_button == Some(MouseButton::Left) {
194 window.refresh();
195 }
196 });
191 if self.links.is_empty() {
197 if self.links.is_empty() {
192 return;
198 return;
193 }
199 }