From 90e947a6e26e02f10ec7f1694c4eb5b78a86406b Mon Sep 17 00:00:00 2001 From: Can Celik Date: Thu, 10 Sep 2026 16:37:50 +0300 Subject: fix: bound mouse selection repaint cadence (#3901) refs #3895 --- src/client/shell/state.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client/shell/state.rs') diff --git a/src/client/shell/state.rs b/src/client/shell/state.rs index add297e2..60afc3df 100644 --- a/src/client/shell/state.rs +++ b/src/client/shell/state.rs @@ -922,6 +922,8 @@ pub(crate) struct ClientShellState { pub(super) reveal_focused_tab: bool, pub(super) last_tab_bar_width: Option, pub(super) last_composed_size: Option<(u16, u16)>, + pub(super) last_composed_at: Option, + pub(super) selection_repaint_deadline: Option, pub(super) hits: ShellHitMap, pub(super) endpoints: Vec, pub(super) active_endpoint_id: ClientEndpointId, @@ -1078,6 +1080,8 @@ impl ClientShellState { reveal_focused_tab: true, last_tab_bar_width: None, last_composed_size: None, + last_composed_at: None, + selection_repaint_deadline: None, hits: ShellHitMap::default(), endpoints: vec![local_endpoint()], active_endpoint_id: ClientEndpointId::Local, @@ -1258,6 +1262,8 @@ impl ClientShellState { self.reveal_focused_tab = true; self.last_tab_bar_width = None; self.last_composed_size = None; + self.last_composed_at = None; + self.selection_repaint_deadline = None; self.pending_requests.clear(); self.pane_scroll_in_flight.clear(); self.pane_scroll_queued.clear(); @@ -1823,6 +1829,9 @@ impl ClientShellState { pub(crate) fn timer_delay(&self, now: std::time::Instant) -> std::time::Duration { let default = std::time::Duration::from_millis(100); self.selection_autoscroll_deadline + .into_iter() + .chain(self.selection_repaint_deadline) + .min() .map(|deadline| deadline.saturating_duration_since(now).min(default)) .unwrap_or(default) } -- cgit v1.2.3