Skip to content

Conversation

@dinocosta
Copy link
Member

Update the way that both
search::buffer_search::BufferSearchBar.replace_next and search::buffer_search::BufferSearchBar.replace_all are registered as listeners, so that we don't require the replacement editor to be focused in order for these listeners to be active, only requiring the replacement mode to be active in the buffer search bar.

This means that, even if the user is focused on the buffer editor, if the "Replace Next Match" or "Replace All Matches" buttons are clicked, the replacement will be performed.

Closes #42471

Release Notes:

  • Fixed issue with buffer search bar where the replacement buttons ("Replace Next Match" & "Replace All Matches") wouldn't work if search bar was not focused
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 26, 2025
@dinocosta dinocosta force-pushed the 42471-replace-button-focus branch from 39c6d47 to f05bff5 Compare November 26, 2025 16:49
Update the way that both
`search::buffer_search::BufferSearchBar.replace_next` and
`search::buffer_search::BufferSearchBar.replace_all` are registered as
listeners, so that we don't require the replacement editor to be focused
in order for these listeners to be active, only requiring the
replacement mode to be active in the buffer search bar.

This means that, even if the user is focused on the buffer editor, if
the "Replace Next Match" or "Replace All Matches" buttons are clicked,
the replacement will be performed.
@dinocosta dinocosta force-pushed the 42471-replace-button-focus branch from f05bff5 to 5cbc77a Compare November 26, 2025 18:02
@dinocosta dinocosta marked this pull request as ready for review November 26, 2025 19:33
@dinocosta dinocosta merged commit ab96155 into main Nov 27, 2025
23 checks passed
@dinocosta dinocosta deleted the 42471-replace-button-focus branch November 27, 2025 11:00
11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
…ocused (zed-industries#43569)

Update the way that both
`search::buffer_search::BufferSearchBar.replace_next` and
`search::buffer_search::BufferSearchBar.replace_all` are registered as
listeners, so that we don't require the replacement editor to be focused
in order for these listeners to be active, only requiring the
replacement mode to be active in the buffer search bar.

This means that, even if the user is focused on the buffer editor, if
the "Replace Next Match" or "Replace All Matches" buttons are clicked,
the replacement will be performed.

Closes zed-industries#42471 

Release Notes:

- Fixed issue with buffer search bar where the replacement buttons
("Replace Next Match" & "Replace All Matches") wouldn't work if search
bar was not focused
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

2 participants