Use editor::AcceptEditPrediction
in vim keymap (#24596)
* Overrides the action handler to switch to insert mode after jumps. * Returns `vim::Tab` to its behavior from before #24418 Release Notes: - N/A Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
parent
c89ad65782
commit
4c881b6a12
3 changed files with 36 additions and 24 deletions
|
@ -48,7 +48,7 @@ mod signature_help;
|
|||
pub mod test;
|
||||
|
||||
pub(crate) use actions::*;
|
||||
pub use actions::{OpenExcerpts, OpenExcerptsSplit};
|
||||
pub use actions::{AcceptEditPrediction, OpenExcerpts, OpenExcerptsSplit};
|
||||
use aho_corasick::AhoCorasick;
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use blink_manager::BlinkManager;
|
||||
|
@ -1940,15 +1940,6 @@ impl Editor {
|
|||
self.refresh_inline_completion(false, true, window, cx);
|
||||
}
|
||||
|
||||
pub fn inline_completion_start_anchor(&self) -> Option<Anchor> {
|
||||
let active_completion = self.active_inline_completion.as_ref()?;
|
||||
let result = match &active_completion.completion {
|
||||
InlineCompletion::Edit { edits, .. } => edits.first()?.0.start,
|
||||
InlineCompletion::Move { target, .. } => *target,
|
||||
};
|
||||
Some(result)
|
||||
}
|
||||
|
||||
fn inline_completions_disabled_in_scope(
|
||||
&self,
|
||||
buffer: &Entity<Buffer>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue