zed icon indicating copy to clipboard operation
zed copied to clipboard

Clickthrough from `Project Diagnostics` or `References to "..."` to source

Open ophilli opened this issue 1 year ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the feature

When using the Project Diagnostics or References to "..." features I want to be able to click through to the file & line where the problem or reference exists.

For example, my Project Diagnostics page currently has 2 errors and 48 warnings. I want to be able to scroll through that list & click into one of the errors & then look at it in its full and original context.

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

No response

ophilli avatar May 13 '24 07:05 ophilli

Hey @ophilli - are you wanting to jump to the original buffers from the multi-buffer? If you put your cursor in the multi-buffer excerpt and run alt-enter, you should be able to jump to the location in the original buffer. Note that this works with multiple cursors stretching across multiple excerpts in a multi-buffer.

In the UI, you can also click on the headers or dividers between excerpts to jump to the original buffers.

If you want to simply be able to double click the text to jump to an excerpt, you can add this to your settings file:

"double_click_in_multibuffer": "open"

Does this cover your needs?

JosephTLyons avatar May 15 '24 19:05 JosephTLyons

Yes, that is exactly what I wanted! I think that opening on double click should be the default behavior. I see that it was for a brief time #9196 and then switched back in #9214. It seems the original issue for this is #5275.

ophilli avatar May 16 '24 01:05 ophilli

Hey @ophilli - I've went ahead and updated your title to match the request of making this a default.

JosephTLyons avatar May 22 '24 21:05 JosephTLyons

Based on the internal discussions, we do not want to make it the default currently, striving to keep editing in multibuffer close to editing in singleton buffer — where the double click selects the line.

The main reason for that is the whole concept of the multibuffer as not just the panel with the results, but something editable. Instead, we would like to improve the visibility of the alt-enter command that is now considered to be a preferred way to navigate into a corresponding buffer.

So, I will close this issue as not planned currently — whatever the default is, there will be people against it, but at least now it aligns with the internal preferences.

SomeoneToIgnore avatar May 22 '24 23:05 SomeoneToIgnore

Glad I found this, I was permanently trapped in the minibuffer, like a little prison of not quite enough context to edit and fix the problem and no way to get to the file. [edit] this was/is more of a ux issue where if you have enough errors the jump to file arrow scrolls off, if that 'stuck' to the top of the window I wouldn't have felt so trapped: image

rseymour avatar Sep 25 '24 12:09 rseymour