1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 07:44:13 +01:00

add onMultilineOutputEvent for handling more-prompt keypress events

This commit is contained in:
Doug Kearns
2007-08-04 13:38:28 +00:00
parent b1a0af0ad5
commit f71a3c1722
2 changed files with 17 additions and 3 deletions

View File

@@ -146,6 +146,9 @@ function CommandLine() //{{{
multiline_output_widget.style.height = height + "px";
multiline_output_widget.collapsed = false;
setTimeout(function() {
multiline_output_widget.focus();
}, 10);
multiline_output_widget.contentWindow.scrollTo(0, content_height); // scroll to the end when 'nomore' is set
}
@@ -530,7 +533,7 @@ function CommandLine() //{{{
}
}
this.onMultilineEvent = function(event)
this.onMultilineInputEvent = function(event)
{
// for now we just receive keypress events
@@ -548,6 +551,16 @@ function CommandLine() //{{{
}
}
this.onMultilineOutputEvent = function(event)
{
var key = event.toString();
if (key == "<Return>" || key == "<C-j>" || key == "<C-m>")
{
multiline_output_widget.collapsed = true;
vimperator.focusContent();
}
}
// it would be better if we had a destructor in javascript ...
this.destroy = function()
{