[gnome-builder] sourceview: dont allow final line off screen
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] sourceview: dont allow final line off screen
- Date: Tue, 26 Mar 2019 01:55:41 +0000 (UTC)
commit 349be234bca2e5733a06217c6d5a492f99eece75
Author: Christian Hergert <chergert redhat com>
Date: Mon Mar 25 18:54:08 2019 -0700
sourceview: dont allow final line off screen
This ensures that the final line cannot scroll off the screen
by clamping the max overscroll to height-line_hieght.
Related #643
src/libide/sourceview/ide-source-view.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index fcd0d0e89..bbb6c4b2e 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -3810,7 +3810,7 @@ ide_source_view_set_overscroll_num_lines (IdeSourceView *self,
if (new_margin < 0)
new_margin = height + new_margin;
- new_margin = CLAMP (new_margin, 0, height);
+ new_margin = CLAMP (new_margin, 0, height - priv->cached_char_height);
g_object_set (self, "bottom-margin", new_margin, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]