mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Include empty selections in updating link logic on cmd/shift changed
Prevents an issue where pressing cmd while the mouse button is down would create a link which would fire on mouse up if the selection was still empty
This commit is contained in:
parent
6e67448420
commit
40a8c26080
1 changed files with 2 additions and 2 deletions
|
@ -121,14 +121,14 @@ pub fn cmd_shift_changed(
|
|||
}: &CmdShiftChanged,
|
||||
cx: &mut ViewContext<Editor>,
|
||||
) {
|
||||
let pending_nonempty_selection = editor.has_pending_nonempty_selection();
|
||||
let pending_selection = editor.has_pending_selection();
|
||||
|
||||
if let Some(point) = editor
|
||||
.link_go_to_definition_state
|
||||
.last_mouse_location
|
||||
.clone()
|
||||
{
|
||||
if cmd_down && !pending_nonempty_selection {
|
||||
if cmd_down && !pending_selection {
|
||||
let snapshot = editor.snapshot(cx);
|
||||
let kind = if shift_down {
|
||||
LinkDefinitionKind::Type
|
||||
|
|
Loading…
Reference in a new issue