mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:07:59 +01:00
Fix IM mode. Closes issue #457.
This commit is contained in:
@@ -804,12 +804,20 @@ var CommandLine = Module("commandline", {
|
|||||||
// FIXME: Buggy, especially when pasting.
|
// FIXME: Buggy, especially when pasting.
|
||||||
inputMultiline: function inputMultiline(end, callback) {
|
inputMultiline: function inputMultiline(end, callback) {
|
||||||
let cmd = this.command;
|
let cmd = this.command;
|
||||||
|
let self = {
|
||||||
|
end: "\n" + end + "\n",
|
||||||
|
callback: callback
|
||||||
|
};
|
||||||
|
|
||||||
modes.push(modes.INPUT_MULTILINE, null, {
|
modes.push(modes.INPUT_MULTILINE, null, {
|
||||||
mappingSelf: {
|
holdFocus: true,
|
||||||
end: "\n" + end + "\n",
|
leave: function leave() {
|
||||||
callback: callback
|
if (!self.done)
|
||||||
}
|
self.callback(null);
|
||||||
|
},
|
||||||
|
mappingSelf: self
|
||||||
});
|
});
|
||||||
|
|
||||||
if (cmd != false)
|
if (cmd != false)
|
||||||
this._echoLine(cmd, this.HL_NORMAL);
|
this._echoLine(cmd, this.HL_NORMAL);
|
||||||
|
|
||||||
@@ -1431,6 +1439,7 @@ var CommandLine = Module("commandline", {
|
|||||||
|
|
||||||
let index = text.indexOf(self.end);
|
let index = text.indexOf(self.end);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
|
self.done = true;
|
||||||
text = text.substring(1, index);
|
text = text.substring(1, index);
|
||||||
modes.pop();
|
modes.pop();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user