editor: Refactor EditorMode::Full
(#28546)
This PR lightly refactors the `EditorMode::Full` exposing two new methods: `is_full` and `set_mode`. Motivation is to expose fields that modify the behavior when the editor is in `Full` mode. By using is `mode.is_full()` instead of `EditorMode::Full` we can introduce new fields without breaking other places in the code. Release Notes: - N/A Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This commit is contained in:
parent
294a1b63c0
commit
a2a3d1a4bd
13 changed files with 75 additions and 61 deletions
|
@ -95,7 +95,7 @@ impl CursorPosition {
|
|||
cursor_position.position = None;
|
||||
cursor_position.context = None;
|
||||
}
|
||||
editor::EditorMode::Full => {
|
||||
editor::EditorMode::Full { .. } => {
|
||||
let mut last_selection = None::<Selection<Point>>;
|
||||
let snapshot = editor.buffer().read(cx).snapshot(cx);
|
||||
if snapshot.excerpts().count() > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue