ZIm/crates/editor
Sarah Price 54df43e06f
Fix cursor movement in protected files on backspace/delete (#36753)
## Summary

Fixes cursor movement behavior in protected files (like Default
Settings) when pressing backspace or delete keys.

Previously, these keys would cause unwanted cursor movement instead of
being ignored as expected in read-only files.

## Changes

- Added read-only checks to `backspace()` and `delete()` methods in the
editor
- Consistent with existing pattern used by other editing methods
(`indent()`, `outdent()`, `undo()`, etc.)

## Test Plan

1. Open Default Settings in Zed
2. Place cursor at arbitrary position (not at start/end of file)  
3. Press backspace - cursor should remain in place (no movement)
4. Press delete - cursor should remain in place (no movement)

Fixes #36302

Release Notes:

- Fixed backspace and delete keys moving caret in protected files

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-22 13:18:46 +00:00
..
src Fix cursor movement in protected files on backspace/delete (#36753) 2025-08-22 13:18:46 +00:00
Cargo.toml Rename remaining mentions of "inline completion" to "edit prediction" (#35512) 2025-08-04 16:22:18 +00:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00