Disable autoindent in visual block insert mode

This commit is contained in:
Conrad Irwin 2023-08-16 10:44:59 -06:00
parent 1b4dd49b1d
commit 7f06191c9f
6 changed files with 24 additions and 7 deletions

View file

@ -339,6 +339,7 @@ impl Vim {
editor.set_clip_at_line_ends(state.clip_at_line_ends(), cx);
editor.set_collapse_matches(true);
editor.set_input_enabled(!state.vim_controlled());
editor.set_autoindent(state.should_autoindent());
editor.selections.line_mode = matches!(state.mode, Mode::VisualLine);
let context_layer = state.keymap_context_layer();
editor.set_keymap_context_layer::<Self>(context_layer, cx);
@ -355,6 +356,7 @@ impl Vim {
editor.set_cursor_shape(CursorShape::Bar, cx);
editor.set_clip_at_line_ends(false, cx);
editor.set_input_enabled(true);
editor.set_autoindent(true);
editor.selections.line_mode = false;
// we set the VimEnabled context on all editors so that we