# migration: Add for \`editor::GoToHunk\` and \`editor::GoToPrevHunk\` actions \(\#26017\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7d22059a2f1e18f03b6e5f8836557979c460a994)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7d22059a2f1e18f03b6e5f8836557979c460a994

Requested commit: 7d22059a2f1e18f03b6e5f8836557979c460a994

Commit: 7d22059a2f1e18f03b6e5f8836557979c460a994

Tree: ccc5eb1d015645803f43eb3db51a359574cfc498

Author: smit

Committer: GitHub

## Message

```
migration: Add for `editor::GoToHunk` and `editor::GoToPrevHunk` actions (#26017)

We modified few actions in
https://github.com/zed-industries/zed/pull/25846, which are:

`"editor::GoToHunk" -> ["editor::GoToHunk", { "center_cursor": true }]`
`"editor::GoToPrevHunk" -> ["editor::GoToPrevHunk", { "center_cursor":
true }]`

Also, recently we changed and added migration for:

`["editor::GoToPrevHunk", { "center_cursor": true }] ->
["editor::GoToPreviousHunk", { "center_cursor": true }] `

This means:

1. User that might still have `editor::GoToHunk` won't be automatically
migrated to `["editor::GoToHunk", { "center_cursor": true }]`. Note
value of `center_cursor` is false, in first case (default), and true in
second case.

2. User that might still have `editor::GoToPrevHunk` won't be
automatically migrated to `["editor::GoToPreviousHunk", {
"center_cursor": true }]`. Note, `editor::GoToPrevHunk` is renamed
since, it is now invalid action.

This PR adds those migrations.

cc: @marcospb19 

Release Notes:

- N/A
```

## Parents

- [6b16a5555e713a53c2820e5397c94f26732e6cd7](https://git.cafe/gitcafe/zed/commit/6b16a5555e713a53c2820e5397c94f26732e6cd7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7d22059a2f1e18f03b6e5f8836557979c460a994?format=markdown)
