Take a buffer ID in switchBuffer
This commit is contained in:
parent
dd35f1df95
commit
ffed801b0e
3 changed files with 39 additions and 27 deletions
|
@ -72,10 +72,13 @@ export default {
|
|||
},
|
||||
"buffer": (app, args) => {
|
||||
var name = args[0];
|
||||
if (!app.state.buffers.has(name)) {
|
||||
throw new Error("Unknown buffer");
|
||||
for (var buf of app.state.buffers.values()) {
|
||||
if (buf.name === name) {
|
||||
app.switchBuffer(buf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
app.switchBuffer(name);
|
||||
throw new Error("Unknown buffer");
|
||||
},
|
||||
"topic": (app, args) => {
|
||||
var channel = app.state.activeBuffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue