Open excerpts on alt-enter
Also: Remove special handling for alt-shift-D binding in diagnostics view that opens excerpts. Rely on alt-enter in all multi-buffers instead. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
dea40c5d1a
commit
721258911c
3 changed files with 88 additions and 62 deletions
|
@ -649,6 +649,14 @@ impl<T: Toolbar> ToolbarHandle for ViewHandle<T> {
|
|||
}
|
||||
|
||||
impl ItemNavHistory {
|
||||
pub fn len(&self) -> usize {
|
||||
self.history.borrow().len()
|
||||
}
|
||||
|
||||
pub fn truncate(&self, len: usize) {
|
||||
self.history.borrow_mut().truncate(len)
|
||||
}
|
||||
|
||||
pub fn new<T: ItemView>(history: Rc<RefCell<NavHistory>>, item_view: &ViewHandle<T>) -> Self {
|
||||
Self {
|
||||
history,
|
||||
|
@ -666,6 +674,14 @@ impl ItemNavHistory {
|
|||
}
|
||||
|
||||
impl NavHistory {
|
||||
pub fn len(&self) -> usize {
|
||||
self.backward_stack.len()
|
||||
}
|
||||
|
||||
pub fn truncate(&mut self, len: usize) {
|
||||
self.backward_stack.truncate(len);
|
||||
}
|
||||
|
||||
pub fn pop_backward(&mut self) -> Option<NavigationEntry> {
|
||||
self.backward_stack.pop_back()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue