From 83c7367d866b9e37204f826579acec034f4aee0d Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Thu, 6 Jul 2017 07:15:30 +0000 Subject: [PATCH] Fix home command not always working --- plugins/c9.ide.terminal/predict_echo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/c9.ide.terminal/predict_echo.js b/plugins/c9.ide.terminal/predict_echo.js index 437b560d..2f33ad50 100644 --- a/plugins/c9.ide.terminal/predict_echo.js +++ b/plugins/c9.ide.terminal/predict_echo.js @@ -716,7 +716,7 @@ define(function(require, exports, module) { HomeCommand.tryCreate = function(inputText) { if (INPUTS_HOME.indexOf(inputText) > -1 // Only attempt home if we'd jump to the start of a prompt - && (peek(-predictIndex - 1) === "$" || peek(-predictIndex - 2) === "$")) + && (peek(predictIndex - 1) === "$" || peek(predictIndex - 2) === "$")) return new HomeCommand(inputText); }; function HomeCommand() {