vim: Fix inline completions showing up in normal mode (#17727)
Booleans are hard. Release Notes: - Fixed inline completions showing up in Vim normal mode.
This commit is contained in:
@@ -4975,9 +4975,10 @@ impl Editor {
|
||||
let cursor = self.selections.newest_anchor().head();
|
||||
let (buffer, cursor_buffer_position) =
|
||||
self.buffer.read(cx).text_anchor_for_position(cursor, cx)?;
|
||||
|
||||
if !user_requested
|
||||
&& self.enable_inline_completions
|
||||
&& !self.should_show_inline_completions(&buffer, cursor_buffer_position, cx)
|
||||
&& (!self.enable_inline_completions
|
||||
|| !self.should_show_inline_completions(&buffer, cursor_buffer_position, cx))
|
||||
{
|
||||
self.discard_inline_completion(false, cx);
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user