mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Better bounds on SelectView clickable area
This commit is contained in:
parent
44fec0ab50
commit
850e0b2cd1
@ -384,7 +384,13 @@ impl<T: 'static> SelectView<T> {
|
||||
position,
|
||||
offset,
|
||||
} => if let Some(position) = position.checked_sub(offset) {
|
||||
if position < self.last_size {
|
||||
let scrollbar_size = if self.scrollbase.scrollable() {
|
||||
(2, 0)
|
||||
} else {
|
||||
(0, 0)
|
||||
};
|
||||
let clickable_size = self.last_size.saturating_sub(scrollbar_size);
|
||||
if position < clickable_size {
|
||||
fix_scroll = false;
|
||||
self.focus.set(position.y + self.scrollbase.start_line);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user