(Feat): Added a global key to navigate between different sessions
This commit is contained in:
@@ -270,6 +270,25 @@ func (m *Model) handleKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
if len(m.envs) > 0 {
|
||||
switch k {
|
||||
case ",", "<":
|
||||
m.selIdx--
|
||||
if m.selIdx < 0 {
|
||||
m.selIdx = len(m.envs) - 1
|
||||
}
|
||||
m.spring = -4
|
||||
return m, nil
|
||||
case ".", ">":
|
||||
m.selIdx++
|
||||
if m.selIdx >= len(m.envs) {
|
||||
m.selIdx = 0
|
||||
}
|
||||
m.spring = 4
|
||||
return m, nil
|
||||
}
|
||||
}
|
||||
|
||||
switch m.mode {
|
||||
case modeSwitcher:
|
||||
switch k {
|
||||
|
||||
Reference in New Issue
Block a user