editor: Add SelectPageUp/SelectPageDown actions (#13272)
This adds two new actions to `editor`: - `editor::SelectPageUp` - `editor::SelectPageDown` On Linux they're bound by default to `shift-pageup` and `shift-pagedown`, which matches VS Code and JetBrains. Release Notes: - N/A
This commit is contained in:
parent
cd2533de5a
commit
3d4f275c52
5 changed files with 41 additions and 8 deletions
|
@ -330,6 +330,11 @@ impl Editor {
|
|||
self.scroll_manager.visible_line_count
|
||||
}
|
||||
|
||||
pub fn visible_row_count(&self) -> Option<u32> {
|
||||
self.visible_line_count()
|
||||
.map(|line_count| line_count as u32 - 1)
|
||||
}
|
||||
|
||||
pub(crate) fn set_visible_line_count(&mut self, lines: f32, cx: &mut ViewContext<Self>) {
|
||||
let opened_first_time = self.scroll_manager.visible_line_count.is_none();
|
||||
self.scroll_manager.visible_line_count = Some(lines);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue