scrolling fixed, no moreblinking cursor

This commit is contained in:
Peter Cottle 2012-09-30 15:35:23 -07:00
parent 1bbdb5d6a0
commit b22f439a43
2 changed files with 13 additions and 4 deletions

View file

@ -77,6 +77,8 @@ var CommandPromptView = Backbone.View.extend({
// now mutate the cursor...
this.cursorUpdate(el.value.length, el.selectionStart, el.selectionEnd);
// and scroll down due to some weird bug
events.trigger('commandScrollDown');
},
cursorUpdate: function(commandLength, selectionStart, selectionEnd) {
@ -234,6 +236,7 @@ var CommandLineHistoryView = Backbone.View.extend({
this.collection.on('change', this.scrollDown, this);
events.on('issueWarning', this.addWarning, this);
events.on('commandScrollDown', this.scrollDown, this);
},
addWarning: function(msg) {
@ -256,6 +259,9 @@ var CommandLineHistoryView = Backbone.View.extend({
var t = $('#terminal')[0];
if ($(t).hasClass('scrolling')) {
console.log('scrolling');
console.log(t.scrollHeight);
console.log(t.scrollTop);
t.scrollTop = t.scrollHeight;
return;
}