zed icon indicating copy to clipboard operation
zed copied to clipboard

Double-click in multi-buffer to jump to that location in a single-buffer

Open rkusa opened this issue 1 year ago • 6 comments

Check for existing issues

  • [X] Completed

Is your feature request related to a problem?

While using Zed as the only editor for a whole day, I was constantly trying to double-click into a multi-buffer to open that location in a single-buffer, but this doesn't work.

I know that Zed has little arrows to jump to locations, but I personally found them to be hard to locate and hard to mentally assign them to their corresponding code locations (as they are always quite far off to the up and right of the code location they correspond to): Screenshot 2022-07-21 at 15 09 53

Describe the solution you'd like

In both Sublime Text and VSCode, you can double-click the occurrence in a search result to open it in a single-buffer.

In Sublime Text, it only works for double clicks on the highlighted occurrence. Double-clicks everywhere else in the excerpt fall back to the default double-click behaviour. In VSCode it works for double-clicks everywhere in the excerpt and it moves the cursor in the single-buffer to the location you've double-clicked.

I'd personally prefer the behaviour of VSCode as I sometimes want to directly jump to an adjacent line. I'd also like this to work in all multi-buffers, e.g. in the find all references one.

If applicable, add mockups / screenshots to help present your vision of the feature

Example from Sublime Text:

https://user-images.githubusercontent.com/409021/180222442-d252d853-9add-4d4c-85b5-bb891761bfe8.mov

rkusa avatar Jul 21 '22 13:07 rkusa