termio: fix key bindings for scrolling

This commit is contained in:
Boris Faure 2018-02-12 22:03:02 +01:00
parent efb6df10b7
commit 3aac7976b7
3 changed files with 9 additions and 6 deletions

View File

@ -5408,7 +5408,8 @@ _smart_pty_change(void *data)
EINA_SAFETY_ON_NULL_RETURN(sd);
// if scroll to bottom on updates
if (sd->jump_on_change) sd->scroll = 0;
if (sd->jump_on_change)
sd->scroll = 0;
_smart_update_queue(data, sd);
}
@ -6090,12 +6091,13 @@ termio_add(Evas_Object *win, Config *config,
void
termio_key_down(Evas_Object *termio,
const Evas_Event_Key_Down *ev)
const Evas_Event_Key_Down *ev,
Eina_Bool action_handled)
{
Termio *sd = evas_object_smart_data_get(termio);
EINA_SAFETY_ON_NULL_RETURN(sd);
if (sd->jump_on_keypress)
if (sd->jump_on_keypress && !action_handled)
{
if (!key_is_modifier(ev->key))
{

View File

@ -56,7 +56,8 @@ Termpty *termio_pty_get(const Evas_Object *obj);
Evas_Object * termio_miniview_get(const Evas_Object *obj);
Term* termio_term_get(const Evas_Object *obj);
void termio_key_down(Evas_Object *termio, const Evas_Event_Key_Down *ev);
void termio_key_down(Evas_Object *termio, const Evas_Event_Key_Down *ev,
Eina_Bool action_handled);
void termio_focus_in(Evas_Object *termio);
void termio_focus_out(Evas_Object *termio);

View File

@ -1512,13 +1512,13 @@ end:
GROUPED_INPUT_TERM_FOREACH(wn, l, term)
{
if (term)
termio_key_down(term->termio, ev);
termio_key_down(term->termio, ev, done);
}
}
else
{
if (term)
termio_key_down(term->termio, ev);
termio_key_down(term->termio, ev, done);
}
}