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