mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
Make Alt+a fallback to server buffer
This commit is contained in:
parent
028382aab3
commit
012b9f515a
1 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import { ReceiptType, Unread } from "/state.js";
|
||||
import { ReceiptType, Unread, SERVER_BUFFER } from "/state.js";
|
||||
|
||||
export const keybindings = [
|
||||
{
|
||||
|
@ -28,12 +28,14 @@ export const keybindings = [
|
|||
description: "Jump to next buffer with activity",
|
||||
execute: (app) => {
|
||||
// TODO: order by priority, then by age
|
||||
var target = SERVER_BUFFER;
|
||||
for (var buf of app.state.buffers.values()) {
|
||||
if (buf.unread != Unread.NONE) {
|
||||
app.switchBuffer(buf.name);
|
||||
target = buf.name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
app.switchBuffer(target);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue