From 8b0c40506319c4c94bc4a431edacb7b91ac6caed Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 25 Feb 2016 18:43:37 +0100 Subject: Console: do not show cursor when disabled --- js/codeq/console.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/codeq') diff --git a/js/codeq/console.js b/js/codeq/console.js index 26d0be8..5317355 100644 --- a/js/codeq/console.js +++ b/js/codeq/console.js @@ -447,8 +447,8 @@ along with this program. If not, see . */ 'setNotBuffered': function () { lineBuffered = false; }, 'onInput': false, // the caller should assign a function here, that takes input as parameter, and optionally returns a promise which is then waited to be resolved before further input is accepted 'onKeypress': false, // same, but it takes a keycode, and returns a keycode - 'inputEnable': function () { inputDisabled = false; }, - 'inputDisable': function () { inputDisabled = true; }, + 'inputEnable': function () { inputDisabled = false; renderCursor(); }, + 'inputDisable': function () { inputDisabled = true; renderCursor(); }, 'keyMaps': {}, // will be filled in later 'leftmostCol': 0, // the column from where editing is possible; it is not possible to delete or change a character to the left of this column @@ -898,7 +898,7 @@ along with this program. If not, see . */ clearInterval(blinkTimer); blinkTimer = null; } - if (cursorVisible) { + if (cursorVisible && !inputDisabled) { jqContent.find('.cq-con-cursor').addClass('inverted'); if ((typeof cursorBlinkRate === 'number') && (cursorBlinkRate >= 50)) { // have some sense of sanity blinkTimer = setInterval(function () { -- cgit v1.2.1