Adam Mulvany
0e575b2809
helix: Fix buffer search: deploy reset to normal mode ( #36917 )
...
## Fix: Preserve Helix mode when using search
### Problem
When using `buffer search: deploy` in Helix mode, pressing Enter to
dismiss the search incorrectly returned to Vim NORMAL mode instead of
Helix NORMAL mode.
### Root Cause
The `search_deploy` function was resetting the entire `SearchState` to
default values when buffer search: deploy was activated. Since the
default `Mode` is `Normal`, this caused `prior_mode` to be set to Vim's
Normal mode regardless of the actual mode before search.
### Solution
Modified `search_deploy` to preserve the current mode when resetting
search state:
- Store the current mode before resetting
- Reset search state to default
- Restore the saved mode to `prior_mode`
This ensures the editor returns to the correct mode (Helix NORMAL or Vim
NORMAL) after dismissing buffer search.
### Settings
I was able to reproduce and then test the fix was successful with the
following config and have also tested with vim: default_mode commented
out to ensure that's not influencing the mode selection flow:
```
"helix_mode": true,
"vim_mode": true,
"vim": {
"default_mode": "helix_normal"
},
```
This is on Kubuntu 24.04.
The following test combinations pass locally:
- `cargo test -p search`
- `cargo test -p vim`
- `cargo test -p editor`
- `cargo test -p workspace`
- `cargo test -p gpui -- vim`
- `cargo test -p gpui -- helix`
Release Notes:
- Fixed Helix mode switching to Vim normal mode after using `buffer
search: deploy` to search
Closes #36872
2025-08-26 10:38:53 -06:00
..
2025-08-25 14:07:10 -06:00
2025-08-25 16:04:44 -06:00
2025-08-20 14:07:37 +02:00
2025-08-20 14:07:37 +02:00
2025-08-26 13:55:09 +00:00
2025-08-26 13:55:09 +00:00
2025-08-26 00:55:24 +00:00
2025-08-20 12:05:58 +02:00
2025-08-26 12:55:40 -03:00
2025-08-25 17:21:20 +00:00
2025-08-05 18:16:47 +00:00
2025-08-19 21:26:17 +02:00
2025-08-13 13:25:52 -06:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:05:58 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 20:33:44 +00:00
2025-08-25 21:07:30 +02:00
2025-08-21 15:56:16 +02:00
2025-08-19 14:20:01 +00:00
2025-08-20 12:05:58 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 21:26:17 +02:00
2025-08-19 13:27:24 +00:00
2025-08-22 03:48:47 -04:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-22 22:17:02 +00:00
2025-08-22 11:45:47 -04:00
2025-08-07 01:28:41 +00:00
2025-08-11 15:34:34 +02:00
2025-08-22 23:28:55 +02:00
2025-08-21 18:50:06 +00:00
2025-08-26 00:27:52 +00:00
2025-08-20 12:20:13 +02:00
2025-08-22 13:16:42 +00:00
2025-08-22 13:58:17 +00:00
2025-08-21 19:59:42 -04:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:05:58 +02:00
2025-08-19 20:33:44 +00:00
2025-08-26 00:27:52 +00:00
2025-08-20 12:20:13 +02:00
2025-08-21 19:08:26 +02:00
2025-08-23 07:03:36 +00:00
2025-08-20 23:41:06 +00:00
2025-08-22 11:45:47 -04:00
2025-08-22 11:45:47 -04:00
2025-08-26 00:27:52 +00:00
2025-08-20 20:14:30 +02:00
2025-08-19 20:33:44 +00:00
2025-08-20 12:05:58 +02:00
2025-08-16 19:00:31 +00:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-26 15:30:26 +02:00
2025-08-21 19:59:42 -04:00
2025-08-25 12:28:33 +03:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 13:27:24 +00:00
2025-08-06 10:53:20 +02:00
2025-08-20 20:14:30 +02:00
2025-08-19 13:27:24 +00:00
2025-08-26 13:55:09 +00:00
2025-08-20 14:07:37 +02:00
2025-08-19 21:26:17 +02:00
2025-08-25 12:45:28 -07:00
2025-08-20 18:45:40 +00:00
2025-08-21 17:19:57 +00:00
2025-08-19 13:27:24 +00:00
2025-08-20 12:20:13 +02:00
2025-08-22 09:52:44 -03:00
2025-08-26 00:27:52 +00:00
2025-08-24 11:01:42 +00:00
2025-08-18 21:54:35 +00:00
2025-08-19 20:33:44 +00:00
2025-08-20 12:20:13 +02:00
2025-08-25 20:18:03 +00:00
2025-08-18 21:54:35 +00:00
2025-08-26 13:55:09 +00:00
2025-08-26 13:55:09 +00:00
2025-08-19 13:27:24 +00:00
2025-08-25 21:16:37 +00:00
2025-08-25 15:51:31 +00:00
2025-08-21 15:56:16 +02:00
2025-08-21 09:24:34 +03:00
2025-08-26 12:55:40 -03:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-09 15:25:47 -04:00
2025-08-24 09:59:32 +03:00
2025-08-19 20:33:44 +00:00
2025-08-19 13:27:24 +00:00
2025-08-06 10:44:15 -04:00
2025-08-26 00:27:52 +00:00
2025-08-25 19:50:08 +00:00
2025-08-19 21:26:17 +02:00
2025-08-21 09:24:34 -04:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:05:58 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 21:26:17 +02:00
2025-08-25 20:18:03 +00:00
2025-08-26 13:35:45 +00:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-22 22:55:50 +00:00
2025-08-22 14:10:45 -07:00
2025-08-19 13:27:24 +00:00
2025-08-25 21:40:53 -06:00
2025-08-25 20:23:29 +00:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:05:58 +02:00
2025-08-19 13:27:24 +00:00
2025-08-20 12:20:13 +02:00
2025-08-21 06:48:04 +00:00
2025-08-20 12:20:13 +02:00
2025-08-22 23:28:55 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 13:27:24 +00:00
2025-08-21 15:56:16 +02:00
2025-08-20 12:20:13 +02:00
2025-08-26 00:27:52 +00:00
2025-08-19 21:26:17 +02:00
2025-08-19 21:26:17 +02:00
2025-08-19 13:27:24 +00:00
2025-08-26 00:27:52 +00:00
2025-08-20 12:20:13 +02:00
2025-08-19 20:33:44 +00:00
2025-08-18 21:54:35 +00:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 21:26:17 +02:00
2025-08-19 20:33:44 +00:00
2025-08-21 19:59:42 -04:00
2025-08-25 20:18:03 +00:00
2025-08-21 19:08:26 +02:00
2025-08-20 14:35:59 +00:00
2025-08-19 21:26:17 +02:00
2025-08-15 15:37:52 -04:00
2025-08-20 12:20:13 +02:00
2025-08-26 00:27:52 +00:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-08 15:34:36 -03:00
2025-08-20 14:07:37 +02:00
2025-08-21 09:37:45 +00:00
2025-08-25 17:34:55 -03:00
2025-08-20 12:20:13 +02:00
2025-08-21 19:08:26 +02:00
2025-08-15 13:54:24 +03:00
2025-08-26 10:38:53 -06:00
2025-08-25 14:28:11 -04:00
2025-08-20 12:20:13 +02:00
2025-08-19 20:33:44 +00:00
2025-08-25 22:21:05 -07:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:05:58 +02:00
2025-08-26 00:27:52 +00:00
2025-08-25 15:46:07 +00:00
2025-08-22 11:45:47 -04:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00