Files
zed/crates
David Alecrim bcf4c71fdb vim: Respect auto_indent setting in o/O commands (#53620)
## Summary

Closes #53570

- `o` and `O` in normal mode were unconditionally copying the current
line's indentation into the new line, ignoring the `auto_indent` setting
entirely
- When `auto_indent: "none"` is set, new lines created by `o`/`O` now
start at column 0 as expected
- When `auto_indent` is `preserve_indent` or `syntax_aware`, behavior is
unchanged

The fix reads `language_settings_at` for the relevant row and splits
edits into two paths: `editor.edit()` (no autoindent) for `None`, and
`editor.edit_with_autoindent()` for everything else — mirroring the
approach already used by the non-vim `Newline` action.

## Test plan

- Added `test_o_auto_indent_none`: verifies `o`/`O` produce column-0
lines with `auto_indent: "none"`, including edge cases (first line,
empty line)
- Added `test_o_preserve_indent`: verifies `o`/`O` copy the current
line's indentation with `auto_indent: "preserve_indent"` (regression
guard)
- Existing neovim-backed tests (`test_o`, `test_insert_line_above`,
`test_o_comment`) continue to pass

Release Notes:

- Fixed vim `o`/`O` commands ignoring the `auto_indent: "none"` setting,
causing new lines to inherit indentation instead of starting at column 0
2026-04-22 16:40:49 +00:00
..
2026-04-22 15:02:57 +00:00
2026-04-22 15:02:57 +00:00
2026-04-22 15:02:57 +00:00
2026-04-22 15:02:57 +00:00
2026-04-17 10:51:32 -04:00
2026-04-05 23:05:35 +01:00
2026-03-27 14:56:46 -07:00
2026-03-11 03:08:39 +00:00
2026-04-21 07:25:22 +00:00
2026-03-30 09:06:59 +00:00
2026-04-22 15:02:57 +00:00
2026-04-21 07:25:22 +00:00
2026-02-26 18:36:50 +01:00
…
2026-04-22 15:02:57 +00:00
2026-04-22 15:02:57 +00:00