support :buffer swiching by keyword

This commit is contained in:
Shin'ya Ueoka 2017-08-30 20:25:58 +09:00
parent 3bb157c84c
commit bd66a670aa
2 changed files with 24 additions and 7 deletions

View file

@ -60,12 +60,11 @@ const normalizeUrl = (string) => {
const cmdBuffer = (arg) => {
if (isNaN(arg)) {
// TODO support buffer identification by non-number value
throw new TypeError(`${arg} is not a number`);
tabs.selectByKeyword(arg);
} else {
let index = parseInt(arg, 10) - 1;
tabs.selectAt(index);
}
let index = parseInt(arg, 10) - 1;
tabs.selectAt(index);
}
const cmdEnterHandle = (request, sender) => {