mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-02 21:24:10 +01:00
Merge.
This commit is contained in:
@@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -687,7 +687,7 @@ function Events() //{{{
|
||||
["<Tab>"], "Advance keyboard focus",
|
||||
function () { document.commandDispatcher.advanceFocus(); });
|
||||
|
||||
mappings.add([modes.NORMAL, modes.PLAYER,modes.VISUAL, modes.CARET, modes.INSERT, modes.TEXTAREA],
|
||||
mappings.add([modes.NORMAL, modes.PLAYER, modes.VISUAL, modes.CARET, modes.INSERT, modes.TEXTAREA],
|
||||
["<S-Tab>"], "Rewind keyboard focus",
|
||||
function () { document.commandDispatcher.rewindFocus(); });
|
||||
|
||||
@@ -898,6 +898,7 @@ function Events() //{{{
|
||||
|
||||
let wasFeeding = this.feedingKeys;
|
||||
this.feedingKeys = true;
|
||||
this.duringFeed = this.duringFeed || "";
|
||||
let wasSilent = commandline.silent;
|
||||
if (silent)
|
||||
commandline.silent = silent;
|
||||
@@ -993,6 +994,15 @@ function Events() //{{{
|
||||
this.feedingKeys = wasFeeding;
|
||||
if (silent)
|
||||
commandline.silent = wasSilent;
|
||||
|
||||
if (this.duringFeed != "")
|
||||
{
|
||||
//Create a scalar constant for closure.
|
||||
let duringFeed = this.duringFeed;
|
||||
this.duringFeed = "";
|
||||
|
||||
setTimeout(function () events.feedkeys(duringFeed, false, false, true), 0);
|
||||
}
|
||||
}
|
||||
return i == keys.length;
|
||||
},
|
||||
@@ -1357,9 +1367,9 @@ function Events() //{{{
|
||||
// we can differentiate between a recorded <C-c>
|
||||
// interrupting whatever it's started and a real <C-c>
|
||||
// interrupting our playback.
|
||||
if (events.feedingKeys)
|
||||
if (events.feedingKeys && !event.isMacro)
|
||||
{
|
||||
if (key == "<C-c>" && !event.isMacro)
|
||||
if (key == "<C-c>")
|
||||
{
|
||||
events.feedingKeys = false;
|
||||
if (modes.isReplaying)
|
||||
@@ -1371,6 +1381,13 @@ function Events() //{{{
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
events.duringFeed += key;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
let stop = true; // set to false if we should NOT consume this event but let Firefox handle it
|
||||
@@ -1653,13 +1670,16 @@ function Events() //{{{
|
||||
}
|
||||
},
|
||||
// for notifying the user about secure web pages
|
||||
onSecurityChange: function (webProgress, aRequest, aState)
|
||||
onSecurityChange: function (webProgress, request, state)
|
||||
{
|
||||
if (aState & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
|
||||
// TODO: do something useful with STATE_SECURE_MED and STATE_SECURE_LOW
|
||||
if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
|
||||
statusline.setClass("insecure");
|
||||
else if (aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
|
||||
else if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
|
||||
statusline.setClass("broken");
|
||||
else if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE)
|
||||
else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL)
|
||||
statusline.setClass("extended");
|
||||
else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH)
|
||||
statusline.setClass("secure");
|
||||
},
|
||||
onStatusChange: function (webProgress, request, status, message)
|
||||
|
||||
Reference in New Issue
Block a user