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:
parent
9407d86ce6
commit
3a6a29f117
1 changed files with 3 additions and 2 deletions
|
@ -4975,9 +4975,10 @@ impl Editor {
|
||||||
let cursor = self.selections.newest_anchor().head();
|
let cursor = self.selections.newest_anchor().head();
|
||||||
let (buffer, cursor_buffer_position) =
|
let (buffer, cursor_buffer_position) =
|
||||||
self.buffer.read(cx).text_anchor_for_position(cursor, cx)?;
|
self.buffer.read(cx).text_anchor_for_position(cursor, cx)?;
|
||||||
|
|
||||||
if !user_requested
|
if !user_requested
|
||||||
&& self.enable_inline_completions
|
&& (!self.enable_inline_completions
|
||||||
&& !self.should_show_inline_completions(&buffer, cursor_buffer_position, cx)
|
|| !self.should_show_inline_completions(&buffer, cursor_buffer_position, cx))
|
||||||
{
|
{
|
||||||
self.discard_inline_completion(false, cx);
|
self.discard_inline_completion(false, cx);
|
||||||
return None;
|
return None;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue