mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-08 10:25:46 +01:00
Yank to * and + by default.
This commit is contained in:
@@ -46,7 +46,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
|
|||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
defaultRegister: "*",
|
defaultRegister: "*+",
|
||||||
|
|
||||||
selectionRegisters: {
|
selectionRegisters: {
|
||||||
"*": "selection",
|
"*": "selection",
|
||||||
@@ -64,6 +64,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
|
|||||||
if (name == null)
|
if (name == null)
|
||||||
name = editor.currentRegister || editor.defaultRegister;
|
name = editor.currentRegister || editor.defaultRegister;
|
||||||
|
|
||||||
|
name = String(name)[0];
|
||||||
if (name == '"')
|
if (name == '"')
|
||||||
name = 0;
|
name = 0;
|
||||||
if (name == "_")
|
if (name == "_")
|
||||||
@@ -101,17 +102,19 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
|
|||||||
value = DOM.stringify(value);
|
value = DOM.stringify(value);
|
||||||
value = { text: value, isLine: modes.extended & modes.LINE, timestamp: Date.now() * 1000 };
|
value = { text: value, isLine: modes.extended & modes.LINE, timestamp: Date.now() * 1000 };
|
||||||
|
|
||||||
if (name == '"')
|
for (let n of String(name)) {
|
||||||
name = 0;
|
if (n == '"')
|
||||||
if (name == "_")
|
n = 0;
|
||||||
;
|
if (n == "_")
|
||||||
else if (hasOwnProperty(this.selectionRegisters, name))
|
;
|
||||||
dactyl.clipboardWrite(value.text, verbose, this.selectionRegisters[name]);
|
else if (hasOwnProperty(this.selectionRegisters, n))
|
||||||
else if (!/^[0-9]$/.test(name))
|
dactyl.clipboardWrite(value.text, verbose, this.selectionRegisters[n]);
|
||||||
this.registers.set(name, value);
|
else if (!/^[0-9]$/.test(n))
|
||||||
else {
|
this.registers.set(n, value);
|
||||||
this.registerRing.insert(value, name);
|
else {
|
||||||
this.registerRing.truncate(10);
|
this.registerRing.insert(value, n);
|
||||||
|
this.registerRing.truncate(10);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user