Fixing issue with x-axis desyncing
This commit is contained in:
parent
e774ea1774
commit
169d8ef365
1 changed files with 7 additions and 3 deletions
10
src/tab.rs
10
src/tab.rs
|
|
@ -2244,13 +2244,17 @@ impl Tab {
|
|||
y: scroll_y as f32
|
||||
};
|
||||
|
||||
if let Some(offset) = self.virtual_cursor_offset {
|
||||
if let Some(virtual_cursor_offset) = self.virtual_cursor_offset {
|
||||
new_offset = Point {
|
||||
x: new_offset.x + offset.x,
|
||||
y: new_offset.y + offset.y,
|
||||
x: new_offset.x + virtual_cursor_offset.x,
|
||||
y: new_offset.y + virtual_cursor_offset.y,
|
||||
};
|
||||
}
|
||||
|
||||
if let Some(last_scroll_position) = self.last_scroll_position {
|
||||
new_offset.x = (pos.x - last_scroll_position.x);
|
||||
}
|
||||
|
||||
self.virtual_cursor_offset = Some(new_offset);
|
||||
self.last_scroll_offset = Some(new_offset);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue