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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user