Show buffer_search on vim::MoveToNextMatch (#11836)
This changes the vim::MoveToNextMatch event callback to open the buffer_search toolbar. This fixes an issue where highlights would appear which were only cancellable by opening then closing the toolbar. Release Notes: - the buffer search toolbar now opens on vim::MoveToNextMatch fixing the issue where highlights were not cancellable --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
@@ -218,6 +218,9 @@ pub fn move_to_match_internal(
|
||||
pane.update(cx, |pane, cx| {
|
||||
if let Some(search_bar) = pane.toolbar().read(cx).item_of_type::<BufferSearchBar>() {
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
if !search_bar.has_active_match() || !search_bar.show(cx) {
|
||||
return;
|
||||
}
|
||||
search_bar.select_match(direction, count, cx);
|
||||
|
||||
let new_selections = vim.editor_selections(cx);
|
||||
|
||||
Reference in New Issue
Block a user