mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
hyperterm: jump to begining of end at edges of tabs when moving sideways (#22)
This commit is contained in:
parent
a943f9d96a
commit
b22d310c99
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue