Enable panel switching

This commit is contained in:
Conrad Irwin 2023-11-15 21:01:00 -07:00
parent 7f70712dac
commit 0a9fb3978b
15 changed files with 203 additions and 131 deletions

View file

@ -12,8 +12,8 @@ use crate::{
},
scroll::scroll_amount::ScrollAmount,
CursorShape, DisplayPoint, Editor, EditorMode, EditorSettings, EditorSnapshot, EditorStyle,
HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, PageDown, PageUp, Point, SelectPhase,
Selection, SoftWrap, ToPoint, MAX_LINE_LEN,
HalfPageDown, HalfPageUp, LineDown, LineUp, MoveDown, OpenExcerpts, PageDown, PageUp, Point,
SelectPhase, Selection, SoftWrap, ToPoint, MAX_LINE_LEN,
};
use anyhow::Result;
use collections::{BTreeMap, HashMap};
@ -45,7 +45,7 @@ use std::{
};
use sum_tree::Bias;
use theme::{ActiveTheme, PlayerColor};
use ui::{h_stack, IconButton};
use ui::{h_stack, IconButton, Tooltip};
use util::ResultExt;
use workspace::item::Item;
@ -2036,7 +2036,9 @@ impl EditorElement {
.on_click(move |editor: &mut Editor, cx| {
editor.jump(jump_path.clone(), jump_position, jump_anchor, cx);
})
.tooltip("Jump to Buffer") // todo!(pass an action as well to show key binding)
.tooltip(move |_, cx| {
Tooltip::for_action("Jump to Buffer", &OpenExcerpts, cx)
})
});
let element = if *starts_new_buffer {