Merge 55f3f6c60f
into 633ce23ae9
This commit is contained in:
commit
d0c0f60043
3 changed files with 8 additions and 2 deletions
|
@ -192,6 +192,7 @@ impl Vim {
|
|||
self.search = SearchState {
|
||||
direction,
|
||||
count,
|
||||
vim_mode_search: true,
|
||||
prior_selections,
|
||||
prior_operator: self.operator_stack.last().cloned(),
|
||||
prior_mode,
|
||||
|
|
|
@ -975,6 +975,7 @@ impl Clone for ReplayableAction {
|
|||
pub struct SearchState {
|
||||
pub direction: Direction,
|
||||
pub count: usize,
|
||||
pub vim_mode_search: bool,
|
||||
|
||||
pub prior_selections: Vec<Range<Anchor>>,
|
||||
pub prior_operator: Option<Operator>,
|
||||
|
|
|
@ -332,8 +332,12 @@ pub fn init(cx: &mut App) {
|
|||
.and_then(|item| item.act_as::<Editor>(cx))
|
||||
.and_then(|editor| editor.read(cx).addon::<VimAddon>().cloned());
|
||||
let Some(vim) = vim else { return };
|
||||
vim.entity.update(cx, |_, cx| {
|
||||
cx.defer_in(window, |vim, window, cx| vim.search_submit(window, cx))
|
||||
vim.entity.update(cx, |vim, cx| {
|
||||
if vim.search.vim_mode_search {
|
||||
cx.defer_in(window, |vim, window, cx| vim.search_submit(window, cx))
|
||||
} else {
|
||||
cx.propagate()
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue