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

Import some fixes from Vimperator. Thanks anekos, teramoko, and stepnem.

This commit is contained in:
Kris Maglione
2010-09-18 03:42:48 -04:00
parent bc7cff0442
commit 508cc08a8f
10 changed files with 36 additions and 28 deletions

View File

@@ -554,8 +554,8 @@ const Editor = Module("editor", {
getAbbreviations: function (filter, lhs) {
// ! -> list all, on c or i ! matches too
let searchFilter = (filter == "!") ? "!ci" : filter + "!";
return list = [[mode, left, right] for ([left, [mode, right]] in this.abbrevs())
if (searchFilter.indexOf(mode) >= 0 && left.indexOf(lhs || "") == 0)];
return [[mode, left, right] for ([left, [mode, right]] in this.abbrevs())
if (searchFilter.indexOf(mode) >= 0 && left.indexOf(lhs || "") == 0)];
},
/**
@@ -968,11 +968,8 @@ const Editor = Module("editor", {
editor.executeCommand("cmd_copy");
modes.set(modes.TEXTAREA);
}
else {
let sel = window.content.document.getSelection();
dactyl.assert(sel);
dactyl.clipboardWrite(sel, true);
}
else
dactyl.clipboardWrite(buffer.getCurrentWord(), true);
});
mappings.add([modes.VISUAL, modes.TEXTAREA],