Return back to history-based tabs activation on close (#19150)

Closes https://github.com/zed-industries/zed/issues/19036

Alters https://github.com/zed-industries/zed/pull/18168 and moves its
change behind a settings flag, restoring the previous behavior.

Release Notes:

- Fixed tab closing not respecting history. Use `tabs.activate_on_close
= neighbour` settings to activate near tabs instead.
This commit is contained in:
Kirill Bulatov
2024-10-13 14:35:06 +03:00
committed by GitHub
parent 6491148196
commit 39468de8c6
4 changed files with 129 additions and 18 deletions
+26 -1
View File
@@ -539,7 +539,8 @@ List of `string` values
"tabs": {
"close_position": "right",
"file_icons": false,
"git_status": false
"git_status": false,
"activate_on_close": "history"
},
```
@@ -579,6 +580,30 @@ List of `string` values
- Setting: `git_status`
- Default: `false`
### Activate on close
- Description: What to do after closing the current tab.
- Setting: `activate_on_close`
- Default: `history`
**Options**
1. Activate the tab that was open previously:
```json
{
"activate_on_close": "history"
}
```
2. Activate the neighbour tab (prefers the right one, if present):
```json
{
"activate_on_close": "neighbour"
}
```
## Editor Toolbar
- Description: Whether or not to show various elements in the editor toolbar.