mirror of https://github.com/helix-editor/helix
deletion of lines affecting popup scrolling (#2497)
parent
8493b5fca6
commit
301ed9b48f
|
@ -88,8 +88,6 @@ impl<T: Component> Popup<T> {
|
||||||
|
|
||||||
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