narrow ansi-viewer list.

This commit is contained in:
Christopher Jeffrey 2015-04-18 23:58:41 -07:00
parent a55e7620a0
commit 034728e900
1 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/**
* ansi-art-viewer
* ansi-viewer
* ANSI art viewer for node.
* Copyright (c) 2015, Christopher Jeffrey and contributors (MIT License).
* https://github.com/chjj/blessed
@ -20,6 +20,10 @@ var map = urls.reduce(function(map, url) {
return map;
}, {});
var max = Object.keys(map).reduce(function(out, text) {
return Math.max(out, text.length);
}, 0) + 6;
screen = blessed.screen({
smartCSR: true,
dockBorders: true
@ -41,8 +45,8 @@ var list = blessed.list({
draggable: true,
top: 0,
right: 0,
width: '40%',
height: '40%',
width: max,
height: '50%',
keys: true,
vi: true,
mouse: true,