From 1a8bfad8447f14f037239fadec6469f656757075 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 10 Oct 2015 17:30:57 +0200 Subject: Console: scroll to bottom when editing input line --- js/codeq/console.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'js/codeq/console.js') 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(); } }, -- cgit v1.2.1