Skip to content

git_ui: Open file on double-click in status list#47989

Merged
cole-miller merged 1 commit intozed-industries:mainfrom
cppcoffee:git_ui_double_click
Jan 31, 2026
Merged

git_ui: Open file on double-click in status list#47989
cole-miller merged 1 commit intozed-industries:mainfrom
cppcoffee:git_ui_double_click

Conversation

@cppcoffee
Copy link
Contributor

Release Notes:

  • Improved open file on double-click in status list

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 30, 2026
@cppcoffee
Copy link
Contributor Author

This change improves the user experience in the Git Panel by allowing users to open a file in the editor by double-clicking its entry in the status list.

Previously, opening a file required a secondary click (e.g., Cmd/Ctrl+Click). Single clicking continues to open the file in the diff view.

@cole-miller
Copy link
Member

Thanks!

@cole-miller cole-miller merged commit a2dbf04 into zed-industries:main Jan 31, 2026
29 checks passed
@cppcoffee cppcoffee deleted the git_ui_double_click branch February 1, 2026 00:16
@AlexandreBonaventure
Copy link

Small feedback here: Since #40616 was shipped, I am missing a lot the old behaviour that is: secondary click just open the file but without expanded diff hunks. I also saw that in the linked PR, it was said that no configuration should be needed, but I personally find this very annoying. I extensively use this when working to navigate through changed files.

Anyhow, I am willing to PR to add a configuration, but one idea could also be to distinguish the 2 actions like so:

  • double-click: just open the file
  • secondary click: open the file with expanded diff

wdyt?

@cppcoffee
Copy link
Contributor Author

Small feedback here: Since #40616 was shipped, I am missing a lot the old behaviour that is: secondary click just open the file but without expanded diff hunks. I also saw that in the linked PR, it was said that no configuration should be needed, but I personally find this very annoying. I extensively use this when working to navigate through changed files.

Anyhow, I am willing to PR to add a configuration, but one idea could also be to distinguish the 2 actions like so:

  • double-click: just open the file
  • secondary click: open the file with expanded diff

wdyt?

Hi @AlexandreBonaventure , The original functionality remains unchanged; only the double-click behavior was modified to just open the file. This change has not been released yet.

@AlexandreBonaventure
Copy link

@cppcoffee sure, yes I understand! I was just sharing my thoughts for how we could use the double-click to bring back the old behaviour (I miss it :) ) in a follow-up PR if that makes sense!

@cppcoffee
Copy link
Contributor Author

@cppcoffee sure, yes I understand! I was just sharing my thoughts for how we could use the double-click to bring back the old behaviour (I miss it :) ) in a follow-up PR if that makes sense!

Hi @AlexandreBonaventure , Double-click is undefined in the latest release version:

2026-02-05.10.20.54.mov

@AlexandreBonaventure
Copy link

yes I know :)
I meant the "old" behaviour before #40616 landed, that is: secondary click used to just open the file without expanding diff hunks

@cppcoffee
Copy link
Contributor Author

yes I know :) I meant the "old" behaviour before #40616 landed, that is: secondary click used to just open the file without expanding diff hunks

This modification did not change the original right-click functionality, the operation is as follows:

2026-02-06.09.20.48.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants