From 5612bec78b463a29ea48dee9fd291f12f47abe1c Mon Sep 17 00:00:00 2001 From: Simon Mollweide Date: Sat, 5 May 2018 19:54:03 +0200 Subject: [PATCH] fix(focus): optimize focus rendering --- src/renderFocus/index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/renderFocus/index.js b/src/renderFocus/index.js index 46ce7c1..846c7a0 100644 --- a/src/renderFocus/index.js +++ b/src/renderFocus/index.js @@ -1,8 +1,6 @@ /* eslint no-console: 0*/ 'use strict'; const { getState, getUiState } = require('../store'); -const { getTerminal } = require('../getTerminalPanel'); -const { getDimensions } = require('../getDimensions'); const renderAllPanels = require('../renderAllPanels'); /** @@ -12,13 +10,10 @@ const renderAllPanels = require('../renderAllPanels'); function renderFocus() { const state = getState(); const uiState = getUiState(); - const dimensions = getDimensions(); - const panelWidth = parseInt(dimensions.width, 10); - const panelHeight = parseInt(dimensions.height, 10) - 1; const currentState = Object.assign({}, state); if (currentState[uiState.focus]) { - uiState.print(getTerminal(panelWidth, panelHeight, uiState.focus, currentState[uiState.focus].log).join('')); + uiState.print(`${currentState[uiState.focus].log.join('\n')}\n\n`); return; }