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
|
@ -1172,7 +1172,7 @@ async fn test_send_breakpoints_when_editor_has_been_saved(
|
|||
|
||||
let (editor, cx) = cx.add_window_view(|window, cx| {
|
||||
Editor::new(
|
||||
EditorMode::Full,
|
||||
EditorMode::full(),
|
||||
MultiBuffer::build_from_buffer(buffer, cx),
|
||||
Some(project.clone()),
|
||||
window,
|
||||
|
@ -1347,7 +1347,7 @@ async fn test_unsetting_breakpoints_on_clear_breakpoint_action(
|
|||
|
||||
let (first_editor, cx) = cx.add_window_view(|window, cx| {
|
||||
Editor::new(
|
||||
EditorMode::Full,
|
||||
EditorMode::full(),
|
||||
MultiBuffer::build_from_buffer(first, cx),
|
||||
Some(project.clone()),
|
||||
window,
|
||||
|
@ -1357,7 +1357,7 @@ async fn test_unsetting_breakpoints_on_clear_breakpoint_action(
|
|||
|
||||
let (second_editor, cx) = cx.add_window_view(|window, cx| {
|
||||
Editor::new(
|
||||
EditorMode::Full,
|
||||
EditorMode::full(),
|
||||
MultiBuffer::build_from_buffer(second, cx),
|
||||
Some(project.clone()),
|
||||
window,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue