mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-05 09:45:45 +01:00
Fix closing menus on <Esc> broken in revision bf712a2498ed.
This commit is contained in:
@@ -844,19 +844,19 @@ var Editor = Module("editor", {
|
|||||||
[[modes.AUTOCOMPLETE]].concat(Array.slice(arguments)))
|
[[modes.AUTOCOMPLETE]].concat(Array.slice(arguments)))
|
||||||
|
|
||||||
bind(["<Esc>"], "Return to INSERT mode",
|
bind(["<Esc>"], "Return to INSERT mode",
|
||||||
function () Events.PASS);
|
function () Events.PASS_THROUGH);
|
||||||
|
|
||||||
bind(["<C-[>"], "Return to INSERT mode",
|
bind(["<C-[>"], "Return to INSERT mode",
|
||||||
function () { events.feedkeys("<Esc>", { skipmap: true }); });
|
function () { events.feedkeys("<Esc>", { skipmap: true }); });
|
||||||
|
|
||||||
bind(["<Up>"], "Select the previous autocomplete result",
|
bind(["<Up>"], "Select the previous autocomplete result",
|
||||||
function () Events.PASS);
|
function () Events.PASS_THROUGH);
|
||||||
|
|
||||||
bind(["<C-p>"], "Select the previous autocomplete result",
|
bind(["<C-p>"], "Select the previous autocomplete result",
|
||||||
function () { events.feedkeys("<Up>", { skipmap: true }); });
|
function () { events.feedkeys("<Up>", { skipmap: true }); });
|
||||||
|
|
||||||
bind(["<Down>"], "Select the next autocomplete result",
|
bind(["<Down>"], "Select the next autocomplete result",
|
||||||
function () Events.PASS);
|
function () Events.PASS_THROUGH);
|
||||||
|
|
||||||
bind(["<C-n>"], "Select the next autocomplete result",
|
bind(["<C-n>"], "Select the next autocomplete result",
|
||||||
function () { events.feedkeys("<Down>", { skipmap: true }); });
|
function () { events.feedkeys("<Down>", { skipmap: true }); });
|
||||||
|
|||||||
@@ -522,7 +522,10 @@ var Modes = Module("modes", {
|
|||||||
|
|
||||||
mappings.add([modes.MENU], ["<Esc>"],
|
mappings.add([modes.MENU], ["<Esc>"],
|
||||||
"Close the current popup",
|
"Close the current popup",
|
||||||
function () Events.PASS);
|
function () {
|
||||||
|
modes.pop();
|
||||||
|
return Events.PASS_THROUGH;
|
||||||
|
});
|
||||||
|
|
||||||
mappings.add([modes.MENU], ["<C-[>"],
|
mappings.add([modes.MENU], ["<C-[>"],
|
||||||
"Close the current popup",
|
"Close the current popup",
|
||||||
|
|||||||
Reference in New Issue
Block a user