diff options
Diffstat (limited to 'src/console')
-rw-r--r-- | src/console/console.js | 9 | ||||
-rw-r--r-- | src/console/console.scss | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/console/console.js b/src/console/console.js index 3c7d61f..d139a50 100644 --- a/src/console/console.js +++ b/src/console/console.js @@ -43,7 +43,7 @@ const completeNext = () => { } let input = window.document.querySelector('#vimvixen-console-command-input'); - input.value = completionOrigin + item.content; + input.value = completionOrigin + ' ' + item.content; } const completePrev = () => { @@ -56,7 +56,7 @@ const completePrev = () => { } let input = window.document.querySelector('#vimvixen-console-command-input'); - input.value = completionOrigin + item.content; + input.value = completionOrigin + ' ' + item.content; } const handleKeydown = (e) => { @@ -80,6 +80,9 @@ const handleKeydown = (e) => { }; const handleKeyup = (e) => { + if (e.keyCode === KeyboardEvent.DOM_VK_TAB) { + return; + } if (e.target.value === prevValue) { return; } @@ -157,7 +160,7 @@ const setCompletions = (completions) => { window.completion = new Completion(flatten); let input = window.document.querySelector('#vimvixen-console-command-input'); - completionOrigin = input.value; + completionOrigin = input.value.split(' ')[0]; } messages.receive(window, (message) => { diff --git a/src/console/console.scss b/src/console/console.scss index b91e0b8..c22b14f 100644 --- a/src/console/console.scss +++ b/src/console/console.scss @@ -8,6 +8,7 @@ body { bottom: 0; left: 0; right: 0; + overflow: hidden; } .vimvixen-console { @@ -38,7 +39,9 @@ body { &-item { padding-left: 1.5rem; background-position: 0 center; + background-size: contain; background-repeat: no-repeat; + white-space: nowrap; &-caption { display: inline-block; |