editor: Fix sometimes green (+) cursor style appearing when cmd-clicking to navigate and back (#34557)
Regressed in https://github.com/zed-industries/zed/pull/33928 This PR clears the selection drag state when the editor focus is out. To reproduce: 1. Select some item in buffer that has a go to definition. 2. Cmd+Click mouse down on it, but don't let go. 3. Wait for 300ms+. 4. Now cursor changed to green + (valid state, this is for selection drag-n-drop). 5. Now let go of your mouse down, we switched to a different file. Cursor looks normal. 6. Come back to the previous buffer, see green + cursor style (BUG!). Release Notes: - Fixed the issue where the green (+) cursor style sometimes appears when navigating to the definition and then back to the previous buffer.
This commit is contained in:
parent
dc8d0868ec
commit
ffc69b07e5
1 changed files with 1 additions and 0 deletions
|
@ -20562,6 +20562,7 @@ impl Editor {
|
|||
if event.blurred != self.focus_handle {
|
||||
self.last_focused_descendant = Some(event.blurred);
|
||||
}
|
||||
self.selection_drag_state = SelectionDragState::None;
|
||||
self.refresh_inlay_hints(InlayHintRefreshReason::ModifiersChanged(false), cx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue