fix: omit diff explorer footer and reclaim its row
This commit is contained in:
@@ -4,8 +4,9 @@
|
|||||||
- [x] add panes/splits: split current pane above/below (`_`) or left/right (`|`) in Normal mode; navigate panes with Option/Alt+h/j/k/l.
|
- [x] add panes/splits: split current pane above/below (`_`) or left/right (`|`) in Normal mode; navigate panes with Option/Alt+h/j/k/l.
|
||||||
- shared split layout and directional focus with diff views; independent pane views, shared buffers, and guarded close/force-close actions.
|
- shared split layout and directional focus with diff views; independent pane views, shared buffers, and guarded close/force-close actions.
|
||||||
- [x] remove diff viewer's file explorer's `A added M modified...` explanation - it's standard and the explanation doesn't fit in the pane, so it can go.
|
- [x] remove diff viewer's file explorer's `A added M modified...` explanation - it's standard and the explanation doesn't fit in the pane, so it can go.
|
||||||
- [ ] add tabs: tab support, editor action to open a buffer in a new tab, default tab navigation is `ctrl+option+h/l`, close tab action.
|
- no replacement help footer in diff file lists; reclaim its row for file entries.
|
||||||
- [ ] diff view: add character-wise change highlight (enabled by default).
|
- [ ] diff view: add character-wise change highlight (enabled by default).
|
||||||
|
- [ ] add tabs: tab support, editor action to open a buffer in a new tab, default tab navigation is `ctrl+option+h/l`, close tab action.
|
||||||
- [ ] diff view: lsp actions should act as they normally would. if an lsp action would open another file, then the file should be opened in another tab outside the diff view - if the referenced file/symbol is part of the changes in the diff, it should just be opened in the diff view.
|
- [ ] diff view: lsp actions should act as they normally would. if an lsp action would open another file, then the file should be opened in another tab outside the diff view - if the referenced file/symbol is part of the changes in the diff, it should just be opened in the diff view.
|
||||||
- this will require tab support.
|
- this will require tab support.
|
||||||
- [ ] diff view: change diff view modes; choose between split and unified diff view (split by default).
|
- [ ] diff view: change diff view modes; choose between split and unified diff view (split by default).
|
||||||
|
|||||||
+6
-15
@@ -3395,7 +3395,7 @@ fn draw_file_list(
|
|||||||
}
|
}
|
||||||
let show_root = content.height >= 4 && !picker.root.as_os_str().is_empty();
|
let show_root = content.height >= 4 && !picker.root.as_os_str().is_empty();
|
||||||
let show_error = picker.error.is_some() && content.height >= 2;
|
let show_error = picker.error.is_some() && content.height >= 2;
|
||||||
let show_help = content.height >= 5 + u16::from(show_error);
|
let show_help = changed_files.is_none() && content.height >= 5 + u16::from(show_error);
|
||||||
let root = show_root.then(|| {
|
let root = show_root.then(|| {
|
||||||
Paragraph::new(display_text(&picker.root.to_string_lossy()))
|
Paragraph::new(display_text(&picker.root.to_string_lossy()))
|
||||||
.style(Style::default().fg(Color::DarkGray))
|
.style(Style::default().fg(Color::DarkGray))
|
||||||
@@ -3550,27 +3550,18 @@ fn draw_file_list(
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if !show_help {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let help = if picker.focused {
|
let help = if picker.focused {
|
||||||
let controls = if changed_files.is_some() {
|
let controls = match (picker.presentation, browsing) {
|
||||||
if browsing {
|
|
||||||
"Enter · i filter · Esc close · Tab panes · ^T view"
|
|
||||||
} else {
|
|
||||||
"Enter · Esc · Tab panes · ^T view"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
match (picker.presentation, browsing) {
|
|
||||||
(FilePresentation::Floating, true) => "Enter · i filter · Esc/^W close · ^R · ^T",
|
(FilePresentation::Floating, true) => "Enter · i filter · Esc/^W close · ^R · ^T",
|
||||||
(FilePresentation::Docked, true) => {
|
(FilePresentation::Docked, true) => "Enter · i filter · Esc/Tab edit · ^W · ^R · ^T",
|
||||||
"Enter · i filter · Esc/Tab edit · ^W · ^R · ^T"
|
|
||||||
}
|
|
||||||
(_, false) if picker.view == FileView::Tree => "Enter · Esc NORMAL · ^W · ^R · ^T",
|
(_, false) if picker.view == FileView::Tree => "Enter · Esc NORMAL · ^W · ^R · ^T",
|
||||||
(FilePresentation::Floating, false) => "Enter · Esc/^W close · ^R · ^T",
|
(FilePresentation::Floating, false) => "Enter · Esc/^W close · ^R · ^T",
|
||||||
(FilePresentation::Docked, false) => "Enter · Esc/Tab edit · ^W · ^R · ^T",
|
(FilePresentation::Docked, false) => "Enter · Esc/Tab edit · ^W · ^R · ^T",
|
||||||
}
|
|
||||||
};
|
};
|
||||||
format!("^U clear · {navigation_hint} · {controls}")
|
format!("^U clear · {navigation_hint} · {controls}")
|
||||||
} else if changed_files.is_some() {
|
|
||||||
"Editor focus · Tab to browse changed files".into()
|
|
||||||
} else {
|
} else {
|
||||||
"Editor focus · invoke explorer to browse".into()
|
"Editor focus · invoke explorer to browse".into()
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user