1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 11:04:25 +01:00

Register and selection magic.

This commit is contained in:
Kris Maglione
2011-10-09 23:52:00 -04:00
parent d444435600
commit 400ec6244b
4 changed files with 97 additions and 62 deletions

View File

@@ -1247,7 +1247,7 @@ var Buffer = Module("Buffer", {
return "";
let range = selection.getRangeAt(0).cloneRange();
if (range.collapsed && range.startContainer instanceof Ci.nsIDOMText) {
if (range.collapsed) {
let re = options.get("iskeyword").regexp;
Editor.extendRange(range, true, re, true);
Editor.extendRange(range, false, re, true);
@@ -1824,7 +1824,7 @@ var Buffer = Module("Buffer", {
events.listen(config.browser, "scroll", buffer.closure._updateBufferPosition, false);
},
mappings: function initMappings(dactyl, modules, window) {
let { Editor, Events, buffer, events, ex, mappings, modes, options, tabs } = modules;
let { Editor, Events, buffer, editor, events, ex, mappings, modes, options, tabs } = modules;
mappings.add([modes.NORMAL],
["y", "<yank-location>"], "Yank current location to the clipboard",
@@ -2094,7 +2094,7 @@ var Buffer = Module("Buffer", {
function () {
let sel = buffer.currentWord;
dactyl.assert(sel);
dactyl.clipboardWrite(sel, true);
editor.setRegister(null, sel, true);
});
// zooming