1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 14:34:11 +01:00

commandline and MIW try to keep focus now

changed commandline handling in general
autosize MIW on new content
new handling should be more robust, but there may be bugs, please report
This commit is contained in:
Martin Stubenschrott
2007-08-12 00:03:44 +00:00
parent 5c3a8426b1
commit 27839f303d
5 changed files with 103 additions and 93 deletions

View File

@@ -42,7 +42,7 @@ const vimperator = (function() //{{{
COMMAND_LINE: 1 << 4,
// extended modes
EX: 1 << 10,
READ_MULTLINE: 1 << 11,
READ_MULTILINE: 1 << 11,
SEARCH_FORWARD: 1 << 12,
SEARCH_BACKWARD: 1 << 13,
ESCAPE_ONE_KEY: 1 << 14,
@@ -125,12 +125,13 @@ const vimperator = (function() //{{{
count: -1 // parsed count from the input buffer
},
/** TODO: for now, these callbacks are mostly for the command line, move there?
* @param type Can be:
/**
* @param type can be:
* "submit": when the user pressed enter in the command line
* "change"
* "cancel"
* "complete"
* TODO: "zoom": if the zoom value of the current buffer changed
*/
registerCallback: function(type, mode, func)
{
@@ -138,12 +139,12 @@ const vimperator = (function() //{{{
callbacks.push([type, mode, func]);
},
triggerCallback: function(type, data)
triggerCallback: function(type, mode, data)
{
for (var i in callbacks)
{
var [thistype, thismode, thisfunc] = callbacks[i];
if (vimperator.hasMode(thismode) && type == thistype)
if (mode == thismode && type == thistype)
return thisfunc.call(this, data);
}
return false;