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:
parent
1a358e203e
commit
3cbac27117
3 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue