billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=31da027aef45e7f650cc7a61f4fda3b9bd3de26f
commit 31da027aef45e7f650cc7a61f4fda3b9bd3de26f Author: godfath3r <galatsan...@gmail.com> Date: Sat Aug 16 18:45:14 2014 +0200 miniview: scroll position indicator when jump on change isn't checked. Summary: Fix indicators position when your are at some place in scrollback and terminal outputs some new lines (say from a running command). It now scrolls to where it should be. Reviewers: billiob Differential Revision: https://phab.enlightenment.org/D1335 --- src/bin/miniview.c | 14 +++++++++----- src/bin/termio.c | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/bin/miniview.c b/src/bin/miniview.c index 40a10b7..deaa4d1 100644 --- a/src/bin/miniview.c +++ b/src/bin/miniview.c @@ -237,11 +237,15 @@ miniview_position_offset(Evas_Object *obj, int by, Eina_Bool sanitize) } else { - mv->screen.pos_val += (double) by / (mv->img_h - mv->rows); - edje_object_part_drag_value_set(mv->base, "miniview_screen", - 0.0, mv->screen.pos_val); - if (mv->screen.pos_val < 0 && sanitize) mv->screen.pos_val = 0; - if (mv->screen.pos_val > 1 && sanitize) mv->screen.pos_val = 1; + if (sanitize) + { + mv->screen.pos_val += (double) by / (mv->img_h - mv->rows); + edje_object_part_drag_value_set(mv->base, "miniview_screen", + 0.0, mv->screen.pos_val); + + if (mv->screen.pos_val < 0) mv->screen.pos_val = 0; + if (mv->screen.pos_val > 1) mv->screen.pos_val = 1; + } } } diff --git a/src/bin/termio.c b/src/bin/termio.c index 16ed54f..94b8f1a 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -4166,6 +4166,8 @@ termio_scroll(Evas_Object *obj, int direction, int start_y, int end_y) if ((!sd->jump_on_change) && // if NOT scroll to bottom on updates (sd->scroll > 0)) { + Evas_Object *mv = term_miniview_get(sd->term); + if (mv) miniview_position_offset(mv, direction, EINA_FALSE); // adjust scroll position for added scrollback sd->scroll -= direction; if (sd->scroll > sd->pty->backscroll_num) --