zed icon indicating copy to clipboard operation
zed copied to clipboard

Add option to prevent focus previous tab after closing a tab

Open mkismy opened this issue 10 months ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the feature

The current behaviour after closing a tab is to focus previous activated tab.

However it is quite hard-to-use so it will be nice to have an option to prevent this and instead open the left or right tab, something equivalent to VSCode's workbench.editor.focusRecentEditorAfterClose: false.

In the recording below, I expect zed to open 5 -> 4 -> 3 -> 2 -> 1

https://github.com/zed-industries/zed/assets/8445575/8e7cc5cf-eae7-4a80-9715-1be7a68187b5

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

No response

mkismy avatar Apr 18 '24 07:04 mkismy

Hey, the order here should not be random, zed focuses the previously activated tab when closing the current one. So you probably activated the tabs in the following order 3 -> 2 -> 4 -> 1 -> 5. Therefore when you close tab 5 zed focuses tab 1, closing tab 1 focuses tab 4, and so on...

bennetbo avatar Apr 18 '24 08:04 bennetbo

Oh, now I understand the patten. I'll rename the issue.

mkismy avatar Apr 18 '24 10:04 mkismy