hyperterm: jump to begining of end at edges of tabs when moving sideways (#22)

This commit is contained in:
Guillermo Rauch 2016-07-02 15:30:21 -07:00
parent a943f9d96a
commit b22d310c99

View file

@ -251,6 +251,9 @@ export default class HyperTerm extends Component {
const next = this.state.active - 1;
if (this.state.sessions[next]) {
this.setActive(next);
} else if (this.state.sessions.length > 1) {
// go to the end
this.setActive(this.state.sessions.length - 1);
}
}
@ -258,6 +261,9 @@ export default class HyperTerm extends Component {
const next = this.state.active + 1;
if (this.state.sessions[next]) {
this.setActive(next);
} else if (this.state.sessions.length > 1) {
// go to the beginning
this.setActive(0);
}
}