editor mode -> display mode

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
This commit is contained in:
Smit Barmase 2025-08-22 14:08:21 +05:30
parent 57a0bb327d
commit c6d0d75711
No known key found for this signature in database
33 changed files with 255 additions and 225 deletions

View file

@ -44,7 +44,7 @@ impl editor::Addon for ConflictAddon {
pub fn register_editor(editor: &mut Editor, buffer: Entity<MultiBuffer>, cx: &mut Context<Editor>) {
// Only show conflict UI for singletons and in the project diff.
if !editor.mode().is_full()
if !editor.display_mode().is_full()
|| (!editor.buffer().read(cx).is_singleton()
&& !editor.buffer().read(cx).all_diff_hunks_expanded())
{

View file

@ -14,7 +14,7 @@ use anyhow::Context as _;
use askpass::AskPassDelegate;
use db::kvp::KEY_VALUE_STORE;
use editor::{
Editor, EditorElement, EditorMode, EditorSettings, MultiBuffer, ShowScrollbar,
Editor, EditorDisplayMode, EditorElement, EditorSettings, MultiBuffer, ShowScrollbar,
scroll::ScrollbarAutoHide,
};
use futures::StreamExt as _;
@ -394,7 +394,7 @@ pub(crate) fn commit_message_editor(
let buffer = cx.new(|cx| MultiBuffer::singleton(commit_message_buffer, cx));
let max_lines = if in_panel { MAX_PANEL_EDITOR_LINES } else { 18 };
let mut commit_editor = Editor::new(
EditorMode::AutoHeight {
EditorDisplayMode::AutoHeight {
min_lines: 1,
max_lines: Some(max_lines),
},