Improve context expansion (#10957)
Release Notes: - Improved expand excerpt indicators to allow unidirectional expansion. Also added the `editor::ExpandExcerptsUp` and `editor::ExpandExcerptsDown` actions, which can both take a `lines` parameter. Also added a `expand_excerpt_lines` setting which controls the default number of lines that the indicators and actions use. --------- Co-authored-by: conrad <conrad@zed.dev>
This commit is contained in:
parent
a0f91299dd
commit
a9e3d4ec4e
27 changed files with 904 additions and 328 deletions
|
@ -39,6 +39,8 @@ pub fn marked_display_snapshot(
|
|||
font,
|
||||
font_size,
|
||||
None,
|
||||
true,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
FoldPlaceholder::test(),
|
||||
|
@ -74,7 +76,7 @@ pub fn assert_text_with_selections(
|
|||
#[allow(dead_code)]
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub(crate) fn build_editor(buffer: Model<MultiBuffer>, cx: &mut ViewContext<Editor>) -> Editor {
|
||||
Editor::new(EditorMode::Full, buffer, None, cx)
|
||||
Editor::new(EditorMode::Full, buffer, None, true, cx)
|
||||
}
|
||||
|
||||
pub(crate) fn build_editor_with_project(
|
||||
|
@ -82,7 +84,7 @@ pub(crate) fn build_editor_with_project(
|
|||
buffer: Model<MultiBuffer>,
|
||||
cx: &mut ViewContext<Editor>,
|
||||
) -> Editor {
|
||||
Editor::new(EditorMode::Full, buffer, Some(project), cx)
|
||||
Editor::new(EditorMode::Full, buffer, Some(project), true, cx)
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue