diff options
author | RichardHitt <rbh00@netcom.com> | 2013-11-14 19:18:07 -0800 |
---|---|---|
committer | RichardHitt <rbh00@netcom.com> | 2013-11-14 19:18:07 -0800 |
commit | 3821e7a7505a2f83938a6d5f9120ebb7771bfcd9 (patch) | |
tree | 41163f40433f61414cd2478d9050a060e32497f2 | |
parent | 1aca24f3dee2e7d333ffe6041aaf2a802c17a742 (diff) |
Fixes #836. Move to line boundary in _scroll{down,up}_timeout() not _scroll().
-rw-r--r-- | src/fe-gtk/xtext.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 684465aa..f9161b7b 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -1341,6 +1341,7 @@ gtk_xtext_scrolldown_timeout (GtkXText * xtext) return 0; } + adj->value = (int)adj->value; /* Align to line boundary */ xtext->select_start_y -= xtext->fontsize; xtext->select_start_adj++; adj->value++; @@ -1373,6 +1374,7 @@ gtk_xtext_scrollup_timeout (GtkXText * xtext) return 0; } + adj->value = (int)adj->value; /* Align to line boundary */ xtext->select_start_y += xtext->fontsize; xtext->select_start_adj--; adj->value--; @@ -2125,14 +2127,14 @@ gtk_xtext_scroll (GtkWidget *widget, GdkEventScroll *event) new_value = xtext->adj->value - (xtext->adj->page_increment / 10); if (new_value < xtext->adj->lower) new_value = xtext->adj->lower; - gtk_adjustment_set_value (xtext->adj, (int)new_value); + gtk_adjustment_set_value (xtext->adj, new_value); } else if (event->direction == GDK_SCROLL_DOWN) /* mouse wheel pageDn */ { new_value = xtext->adj->value + (xtext->adj->page_increment / 10); if (new_value > (xtext->adj->upper - xtext->adj->page_size)) new_value = xtext->adj->upper - xtext->adj->page_size; - gtk_adjustment_set_value (xtext->adj, (int)new_value); + gtk_adjustment_set_value (xtext->adj, new_value); } return FALSE; |