Make term switching cyclic.

The behavior for tab splits is kinda funky (it's kept equal after my
commit) -- one returns to the last or 1st term of the split, when
cycling reaches it, not the split it was in at the last time.
This commit is contained in:
Gustavo Lima Chaves 2014-03-15 01:55:33 -03:00
parent 6cb39e4a8d
commit 906e8009d5
1 changed files with 2 additions and 2 deletions

View File

@ -436,7 +436,7 @@ _term_next_get(Term *termin)
sp = _split_find(termin->wn->win, termin->term);
l = eina_list_data_find_list(sp->terms, termin);
if ((l) && (l->next)) return l->next->data;
if (!sp->parent) return NULL;
if (!sp->parent) return sp->terms->data;
flat = _split_flatten(termin->wn->split);
if (!flat) return NULL;
l = eina_list_data_find_list(flat, sp);
@ -467,7 +467,7 @@ _term_prev_get(Term *termin)
sp = _split_find(termin->wn->win, termin->term);
l = eina_list_data_find_list(sp->terms, termin);
if ((l) && (l->prev)) return l->prev->data;
if (!sp->parent) return NULL;
if (!sp->parent) return eina_list_data_get(eina_list_last(sp->terms));
flat = _split_flatten(termin->wn->split);
if (!flat) return NULL;
l = eina_list_data_find_list(flat, sp);