summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-25 18:43:37 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-25 18:43:37 +0100
commit8b0c40506319c4c94bc4a431edacb7b91ac6caed (patch)
tree6e32b2bc1d88c5dca43eba2ee507fff6a2dc3e89
parent3ae1aeaefa875153e4abbe7a54c06b89ac1f875e (diff)
Console: do not show cursor when disabled
-rw-r--r--js/codeq/console.js6
1 files changed, 3 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>. */
'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 <http://www.gnu.org/licenses/>. */
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 () {