mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-24 03:13:34 +03:00
fix(compatibility): rotate scroll region (#270)
This commit is contained in:
parent
ceb2ebbd2b
commit
f9fe1856f2
@ -447,11 +447,25 @@ impl Grid {
|
||||
self.scroll_down_one_line();
|
||||
}
|
||||
}
|
||||
pub fn rotate_scroll_region_up(&mut self, _count: usize) {
|
||||
// TBD
|
||||
pub fn rotate_scroll_region_up(&mut self, count: usize) {
|
||||
if let Some((scroll_region_top, scroll_region_bottom)) = self.scroll_region {
|
||||
for _ in 0..count {
|
||||
let columns = vec![EMPTY_TERMINAL_CHARACTER; self.width];
|
||||
self.viewport.remove(scroll_region_bottom);
|
||||
self.viewport
|
||||
.insert(scroll_region_top, Row::from_columns(columns).canonical());
|
||||
}
|
||||
}
|
||||
}
|
||||
pub fn rotate_scroll_region_down(&mut self, _count: usize) {
|
||||
// TBD
|
||||
pub fn rotate_scroll_region_down(&mut self, count: usize) {
|
||||
if let Some((scroll_region_top, scroll_region_bottom)) = self.scroll_region {
|
||||
for _ in 0..count {
|
||||
let columns = vec![EMPTY_TERMINAL_CHARACTER; self.width];
|
||||
self.viewport.remove(scroll_region_top);
|
||||
self.viewport
|
||||
.insert(scroll_region_bottom, Row::from_columns(columns).canonical());
|
||||
}
|
||||
}
|
||||
}
|
||||
pub fn add_canonical_line(&mut self) {
|
||||
if let Some((scroll_region_top, scroll_region_bottom)) = self.scroll_region {
|
||||
|
Loading…
Reference in New Issue
Block a user