summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-10 17:30:57 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-10 17:30:57 +0200
commit1a8bfad8447f14f037239fadec6469f656757075 (patch)
tree88d6dc491a896613d4cab65a4315c89a96ad2da0
parentdce9340d12b0be9f541217e0a2dc92bcd17fd6da (diff)
Console: scroll to bottom when editing input line
-rw-r--r--js/codeq/console.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/codeq/console.js b/js/codeq/console.js
index a9c345d..0000f9e 100644
--- a/js/codeq/console.js
+++ b/js/codeq/console.js
@@ -650,6 +650,7 @@
currentCol--;
renderLine(lines[currentRow]);
}
+ scrollCursorIntoView();
},
'moveRight': function () {
@@ -658,6 +659,7 @@
currentCol++;
renderLine(lineDescriptor);
}
+ scrollCursorIntoView();
},
'deleteCharacterLeft': function () {
@@ -670,6 +672,7 @@
lineDescriptor.content = content.substring(0, currentCol) + content.substring(currentCol + 1);
renderLine(lineDescriptor);
}
+ scrollCursorIntoView();
},
'deleteCharacterRight': function () {
@@ -680,6 +683,7 @@
lineDescriptor.content = content.substring(0, currentCol) + content.substring(currentCol + 1);
renderLine(lineDescriptor);
}
+ scrollCursorIntoView();
},
'moveToEndOfLine': function () {
@@ -689,6 +693,7 @@
currentCol = n;
renderLine(lineDescriptor);
}
+ scrollCursorIntoView();
},
'moveToStartOfLine': function () {
@@ -698,6 +703,7 @@
currentCol = leftmost;
renderLine(lineDescriptor);
}
+ scrollCursorIntoView();
},
'destroy': function () {
@@ -761,6 +767,7 @@
lineDescriptor.classNames = mergeClasses(classesBetween(lineDescriptor.classNames, 0, leftmost), makeClassDescriptor('input', leftmost, currentCol - leftmost));
renderLine(lineDescriptor);
}
+ scrollCursorIntoView();
},
'showNextHistory': function () {
@@ -773,6 +780,7 @@
lineDescriptor.classNames = mergeClasses(classesBetween(lineDescriptor.classNames, 0, leftmost), makeClassDescriptor('input', leftmost, currentCol - leftmost));
renderLine(lineDescriptor);
}
+ scrollCursorIntoView();
}
},