xP: bind buffer iteration to M-PageUp/PageDown
This commit is contained in:
parent
c3a52b9e4c
commit
b4ee523628
@ -817,11 +817,8 @@ document.addEventListener('keydown', event => {
|
||||
if (rpc.ws == undefined || !hasShortcutModifiers(event))
|
||||
return
|
||||
|
||||
let names = undefined
|
||||
switch (event.key) {
|
||||
case 'Tab':
|
||||
if (bufferLast !== undefined)
|
||||
bufferActivate(bufferLast)
|
||||
break
|
||||
case 'h':
|
||||
bufferToggleLog()
|
||||
break
|
||||
@ -839,6 +836,26 @@ document.addEventListener('keydown', event => {
|
||||
break
|
||||
}
|
||||
break
|
||||
case 'Tab':
|
||||
if (bufferLast !== undefined)
|
||||
bufferActivate(bufferLast)
|
||||
break
|
||||
case 'PageUp':
|
||||
names = [...buffers.keys()]
|
||||
for (let i = 0; i < names.length; i++)
|
||||
if (names[i] === bufferCurrent) {
|
||||
bufferActivate(names.at(--i))
|
||||
break
|
||||
}
|
||||
break
|
||||
case 'PageDown':
|
||||
names = [...buffers.keys()]
|
||||
for (let i = 0; i < names.length; i++)
|
||||
if (names[i] === bufferCurrent) {
|
||||
bufferActivate(names.at(++i) || names[0])
|
||||
break
|
||||
}
|
||||
break
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user