lsp: only notify if hover state changed (#2577)
Follow-up to #2239, which added clear_hover_state. That method always calls cx.notify(), but on_mouse_move calls it on every mouse move outside the input bounds, where hover state is normally already empty. The input was re-rendering on mouse movement anywhere else in the window for no reason. Now it only notifies when a hover definition or popover was actually cleared. The _hover_task reset stays unconditional so an in-flight hover request is still cancelled during the 150ms debounce in handle_hover_popover, before any popover exists. How to Test Open the code editor story (cargo run, Input Story > Code Editor). Hover a symbol until the popover shows, then move off it, and out of the editor. It should dismiss both times. Cmd-hover a symbol for the go-to-definition underline and confirm that clears too. Hover a symbol and leave the editor within 150ms; the popover should not appear afterwards. Checklist - [x] I have read the CONTRIBUTING (../CONTRIBUTING.md) document and followed the guidelines. - [x] Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate. - [x] Passed cargo run for story tests related to the changes. - [ ] Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)
S
Scott Cummings committed
b5eef62336f88bb6c1ee45bf32f73c9895d49f8d
Parent: 5b45bcb
Committed by GitHub <noreply@github.com>
on 7/20/2026, 3:50:00 AM