From e3950c2fb07724e13b8a3762468b9a2700342fe2 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 8 Jun 2018 12:22:45 -0700 Subject: [PATCH] Give user notification about how to resize --- src/js/terminal.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/terminal.js b/src/js/terminal.js index 180ec120c..1b6a1a7fe 100644 --- a/src/js/terminal.js +++ b/src/js/terminal.js @@ -279,6 +279,12 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client setTimeout(function () { if (!$scope.terminal) return; $scope.terminal.fit(); + + // this is here so that the text wraps correctly after the fit! + var YELLOW = '\u001b[33m'; // https://gist.github.com/dainkaplan/4651352 + var NC = '\u001b[0m'; + $scope.terminal.writeln(YELLOW + 'If you resize the browser window, press Ctrl+D to start a new session with the current size.' + NC); + createTerminalSocket(); // create exec container after we fit() since we cannot resize exec container post-creation }, 1000); });