1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 23:27:59 +01:00

Fix inserting [ '"] as the first character in command-line mode.

This commit is contained in:
Kris Maglione
2010-10-12 12:25:00 -04:00
parent 8582ea8ba5
commit 6907ae130e
3 changed files with 8 additions and 2 deletions

View File

@@ -852,6 +852,9 @@ const CommandLine = Module("commandline", {
catch (e) { catch (e) {
dactyl.reportError(e, true); dactyl.reportError(e, true);
} }
finally {
return true;
}
}, },
/** /**
@@ -1644,7 +1647,8 @@ const CommandLine = Module("commandline", {
["<Space>", '"', "'"], "Expand command line abbreviation", ["<Space>", '"', "'"], "Expand command line abbreviation",
function () { function () {
commandline.resetCompletions(); commandline.resetCompletions();
return editor.expandAbbreviation(modes.COMMAND_LINE); editor.expandAbbreviation(modes.COMMAND_LINE);
return true;
}, },
{ route: true }); { route: true });

View File

@@ -417,7 +417,6 @@ const Editor = Module("editor", {
textbox.selectionStart = currStart - len + abbrText.length; textbox.selectionStart = currStart - len + abbrText.length;
textbox.selectionEnd = currEnd - len + abbrText.length; textbox.selectionEnd = currEnd - len + abbrText.length;
} }
return true; return true;
}, },
}, { }, {

View File

@@ -741,6 +741,8 @@ const Events = Module("events", {
function isEscape(key) key == "<Esc>" || key == "<C-[>"; function isEscape(key) key == "<Esc>" || key == "<C-[>";
function killEvent() { function killEvent() {
if (/key|input/.test(event.type))
util.dumpStack();
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
} }
@@ -869,6 +871,7 @@ const Events = Module("events", {
// only follow a map if there isn't a longer possible mapping // only follow a map if there isn't a longer possible mapping
// (allows you to do :map z yy, when zz is a longer mapping than z) // (allows you to do :map z yy, when zz is a longer mapping than z)
else if (map && !event.skipmap && candidates.length == 0) { else if (map && !event.skipmap && candidates.length == 0) {
util.dump(map, this._input);
this._input.pendingMap = null; this._input.pendingMap = null;
this._input.count = parseInt(countStr, 10); this._input.count = parseInt(countStr, 10);
if (isNaN(this._input.count)) if (isNaN(this._input.count))