mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 18:07:58 +01:00
Fix t_p broken in revision 650be38ccc54. Closes issue #391.
This commit is contained in:
@@ -1383,25 +1383,22 @@ var CommandLine = Module("commandline", {
|
||||
modes.addMode("COMMAND_LINE", {
|
||||
char: "c",
|
||||
description: "Active when the command line is focused",
|
||||
input: true,
|
||||
insert: true,
|
||||
ownsFocus: true,
|
||||
get mappingSelf() commandline.commandSession
|
||||
});
|
||||
// this._extended modes, can include multiple modes, and even main modes
|
||||
modes.addMode("EX", {
|
||||
description: "Ex command mode, active when the command line is open for Ex commands",
|
||||
bases: [modes.COMMAND_LINE],
|
||||
input: true
|
||||
bases: [modes.COMMAND_LINE]
|
||||
});
|
||||
modes.addMode("PROMPT", {
|
||||
description: "Active when a prompt is open in the command line",
|
||||
bases: [modes.COMMAND_LINE],
|
||||
input: true
|
||||
bases: [modes.COMMAND_LINE]
|
||||
});
|
||||
|
||||
modes.addMode("INPUT_MULTILINE", {
|
||||
bases: [modes.INSERT],
|
||||
input: true
|
||||
bases: [modes.INSERT]
|
||||
});
|
||||
},
|
||||
mappings: function init_mappings() {
|
||||
|
||||
@@ -771,10 +771,7 @@ var Editor = Module("editor", {
|
||||
["p"], "Paste clipboard contents",
|
||||
function ({ count }) {
|
||||
dactyl.assert(!editor.isCaret);
|
||||
if (!count)
|
||||
count = 1;
|
||||
while (count--)
|
||||
editor.executeCommand("cmd_paste", count);
|
||||
editor.executeCommand("cmd_paste", count || 1);
|
||||
modes.pop(modes.TEXT_EDIT);
|
||||
},
|
||||
{ count: true });
|
||||
|
||||
@@ -231,7 +231,7 @@ var KeyProcessor = Class("KeyProcessor", {
|
||||
}
|
||||
|
||||
if (!this.waiting)
|
||||
return this.main.input ? Events.PASS : Events.ABORT;
|
||||
return this.main.insert ? Events.PASS : Events.ABORT;
|
||||
|
||||
return Events.WAIT;
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ var Modes = Module("modes", {
|
||||
char: "t",
|
||||
description: "Vim-like editing of input elements",
|
||||
bases: [this.COMMAND],
|
||||
input: true,
|
||||
ownsFocus: true,
|
||||
passUnknown: false
|
||||
});
|
||||
@@ -109,12 +110,12 @@ var Modes = Module("modes", {
|
||||
char: "I",
|
||||
description: "The base mode for input modes, including Insert and Command Line",
|
||||
bases: [this.MAIN],
|
||||
input: true
|
||||
insert: true
|
||||
});
|
||||
this.addMode("INSERT", {
|
||||
char: "i",
|
||||
description: "Active when an input element is focused",
|
||||
input: true,
|
||||
insert: true,
|
||||
ownsFocus: true
|
||||
});
|
||||
this.addMode("AUTOCOMPLETE", {
|
||||
@@ -125,7 +126,7 @@ var Modes = Module("modes", {
|
||||
|
||||
this.addMode("EMBED", {
|
||||
description: "Active when an <embed> or <object> element is focused",
|
||||
input: true,
|
||||
insert: true,
|
||||
ownsFocus: true,
|
||||
passthrough: true
|
||||
});
|
||||
@@ -134,7 +135,7 @@ var Modes = Module("modes", {
|
||||
description: "All keys but <C-v> are ignored by " + config.appName,
|
||||
bases: [this.BASE],
|
||||
hidden: true,
|
||||
input: true,
|
||||
insert: true,
|
||||
passthrough: true
|
||||
});
|
||||
this.addMode("QUOTE", {
|
||||
@@ -445,7 +446,7 @@ var Modes = Module("modes", {
|
||||
|
||||
get bases() this.input ? [modes.INPUT] : [modes.MAIN],
|
||||
|
||||
get count() !this.input,
|
||||
get count() !this.insert,
|
||||
|
||||
get description() this._display,
|
||||
|
||||
@@ -457,7 +458,9 @@ var Modes = Module("modes", {
|
||||
|
||||
hidden: false,
|
||||
|
||||
input: Class.memoize(function input() this.bases.length && this.bases.some(function (b) b.input)),
|
||||
input: Class.memoize(function input() this.insert || this.bases.length && this.bases.some(function (b) b.input)),
|
||||
|
||||
insert: Class.memoize(function insert() this.bases.length && this.bases.some(function (b) b.insert)),
|
||||
|
||||
ownsFocus: Class.memoize(function ownsFocus() this.bases.length && this.bases.some(function (b) b.ownsFocus)),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user