mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-19 13:37:06 +04:00
deletion of lines affecting popup scrolling (#2497)
This commit is contained in:
parent
8493b5fca6
commit
301ed9b48f
@ -88,8 +88,6 @@ pub fn get_size(&self) -> (u16, u16) {
|
|||||||
|
|
||||||
pub fn scroll(&mut self, offset: usize, direction: bool) {
|
pub fn scroll(&mut self, offset: usize, direction: bool) {
|
||||||
if direction {
|
if direction {
|
||||||
self.scroll += offset;
|
|
||||||
|
|
||||||
let max_offset = self.child_size.1.saturating_sub(self.size.1);
|
let max_offset = self.child_size.1.saturating_sub(self.size.1);
|
||||||
self.scroll = (self.scroll + offset).min(max_offset as usize);
|
self.scroll = (self.scroll + offset).min(max_offset as usize);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user