add command-line bar

This commit is contained in:
Shin'ya Ueoka 2017-08-13 21:32:24 +09:00
parent fe3ecc83cf
commit 5a082b4ea5
5 changed files with 79 additions and 0 deletions

View file

@ -1,12 +1,20 @@
import * as scrolls from './scrolls';
import FooterLine from './footer-line';
import * as actions from '../shared/actions';
var footer = null;
const invokeEvent = (action) => {
if (typeof action === 'undefined' || action === null) {
return;
}
switch (action[0]) {
case actions.CMD_OPEN:
footer = new FooterLine(document);
footer.input.value = ':';
footer.focus();
break;
case actions.SCROLL_UP:
scrolls.scrollUp(window, action[1] || 1);
break;