mux-sesh 1.1.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/handlers/keyboard.ts +6 -6
package/package.json
CHANGED
package/src/handlers/keyboard.ts
CHANGED
|
@@ -82,7 +82,7 @@ export function handleNormalMode(
|
|
|
82
82
|
// Handle delete/kill (d for vim, Ctrl+D for standard)
|
|
83
83
|
if ((!isStandard && key.name === 'd') || (isStandard && key.ctrl && key.name === 'd')) {
|
|
84
84
|
if (ctx.viewMode === ViewMode.Sessions && ctx.items[ctx.cursor]?.isSession) {
|
|
85
|
-
ctx.handleKillSession(ctx.
|
|
85
|
+
ctx.handleKillSession(ctx.regularSessions[ctx.cursor].title)
|
|
86
86
|
}
|
|
87
87
|
return
|
|
88
88
|
}
|
|
@@ -94,8 +94,8 @@ export function handleNormalMode(
|
|
|
94
94
|
) {
|
|
95
95
|
if (ctx.viewMode === ViewMode.Sessions && ctx.items[ctx.cursor]?.isSession) {
|
|
96
96
|
ctx.setAppMode(AppMode.Rename)
|
|
97
|
-
ctx.setRenameTarget(ctx.
|
|
98
|
-
ctx.setSearchQuery(ctx.
|
|
97
|
+
ctx.setRenameTarget(ctx.regularSessions[ctx.cursor].title)
|
|
98
|
+
ctx.setSearchQuery(ctx.regularSessions[ctx.cursor].title)
|
|
99
99
|
}
|
|
100
100
|
return
|
|
101
101
|
}
|
|
@@ -143,7 +143,7 @@ export function handleNormalMode(
|
|
|
143
143
|
// Handle selection
|
|
144
144
|
if (key.name === 'return') {
|
|
145
145
|
if (ctx.items[ctx.cursor]) {
|
|
146
|
-
ctx.handleSelect(ctx.
|
|
146
|
+
ctx.handleSelect(ctx.regularSessions[ctx.cursor])
|
|
147
147
|
}
|
|
148
148
|
return
|
|
149
149
|
}
|
|
@@ -151,8 +151,8 @@ export function handleNormalMode(
|
|
|
151
151
|
// Handle number shortcuts (vim only)
|
|
152
152
|
if (!isStandard && key.name >= '1' && key.name <= '9') {
|
|
153
153
|
const num = parseInt(key.name) - 1
|
|
154
|
-
if (num >= 0 && num < ctx.
|
|
155
|
-
ctx.handleSelect(ctx.
|
|
154
|
+
if (num >= 0 && num < ctx.regularSessions.length) {
|
|
155
|
+
ctx.handleSelect(ctx.regularSessions[num])
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|