aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-07-26 00:28:11 +0300
committerGitHub <noreply@github.com>2026-07-26 00:28:11 +0300
commit547aba8e0ab310623f1986d3026658f708d432bd (patch)
tree8b05ec9feec9a3c3c04f21aa308bf22faad3772a /src/app/state.rs
parentb01fc37e66aac45c7fa9eccc826d793d68608a0a (diff)
fix: avoid renders for passive mouse motion (#1872)
refs #1865
Diffstat (limited to 'src/app/state.rs')
-rw-r--r--src/app/state.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/state.rs b/src/app/state.rs
index a3d15a8b..6069b8a6 100644
--- a/src/app/state.rs
+++ b/src/app/state.rs
@@ -814,6 +814,10 @@ pub enum Mode {
}
impl Mode {
+ pub(crate) fn mouse_motion_changes_view(self) -> bool {
+ matches!(self, Self::GlobalMenu | Self::ContextMenu | Self::Navigator)
+ }
+
/// Whether keys in this mode are commands/navigation (an ASCII input source is wanted) rather
/// than free text. This is an explicit **allowlist** of the prefix command/navigation realm:
/// any mode NOT listed defaults to leaving the user's IME alone (the safe default), so adding a