Add keybinding to jump to next unread buffer

This commit is contained in:
Simon Ser 2020-07-23 10:12:57 +02:00
parent 2951c7810f
commit 78140240cc
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -22,6 +22,20 @@ export const keybindings = [
});
},
},
{
key: "a",
altKey: true,
description: "Jump to next buffer with activity",
execute: (app) => {
// TODO: order by priority, then by age
for (var buf of app.state.buffers.values()) {
if (buf.unread != Unread.NONE) {
app.switchBuffer(buf.name);
break;
}
}
},
},
];
export function setup(app) {