vim: Fix clipping when navigating over inlay hints (#22813)
This fixes the issue described in this comment: https://github.com/zed-industries/zed/pull/22439#issuecomment-2563896422 Essentially, we'd clip in the wrong direction when there were multi-line inlay hints. It also fixes inline completions for non-Zeta-providers showing up in normal mode. Release Notes: - N/A
This commit is contained in:
parent
dffdf99228
commit
f9ee28db5e
10 changed files with 76 additions and 13 deletions
|
@ -1196,7 +1196,15 @@ impl Vim {
|
|||
editor.set_input_enabled(vim.editor_input_enabled());
|
||||
editor.set_autoindent(vim.should_autoindent());
|
||||
editor.selections.line_mode = matches!(vim.mode, Mode::VisualLine);
|
||||
editor.set_inline_completions_enabled(matches!(vim.mode, Mode::Insert | Mode::Replace));
|
||||
|
||||
let enable_inline_completions = match vim.mode {
|
||||
Mode::Insert | Mode::Replace => true,
|
||||
Mode::Normal => editor
|
||||
.inline_completion_provider()
|
||||
.map_or(false, |provider| provider.show_completions_in_normal_mode()),
|
||||
_ => false,
|
||||
};
|
||||
editor.set_inline_completions_enabled(enable_inline_completions);
|
||||
});
|
||||
cx.notify()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue