mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-05 13:14:11 +01:00
Add v_o.
This commit is contained in:
@@ -457,7 +457,7 @@ var Editor = Module("editor", {
|
||||
while (idx == 0 && (node = iterator.getPrev())) {
|
||||
let str = node.textContent;
|
||||
if (node == iterator.start)
|
||||
idx = range.endOffset;
|
||||
idx = range.startOffset;
|
||||
else
|
||||
idx = str.length;
|
||||
|
||||
@@ -906,6 +906,19 @@ var Editor = Module("editor", {
|
||||
modes.push(modes.INSERT);
|
||||
});
|
||||
|
||||
mappings.add([modes.VISUAL],
|
||||
["o"], "Focus the other end of the selection",
|
||||
function () {
|
||||
if (editor.isTextEdit)
|
||||
var selection = editor.selection;
|
||||
else
|
||||
selection = buffer.focusedFrame.getSelection();
|
||||
util.assert(selection.focusOffset);
|
||||
let { focusOffset, anchorOffset, focusNode, anchorNode } = selection;
|
||||
selection.collapse(focusNode, focusOffset);
|
||||
selection.extend(anchorNode, anchorOffset);
|
||||
});
|
||||
|
||||
bind(["p"], "Paste clipboard contents",
|
||||
function ({ count }) {
|
||||
dactyl.assert(!editor.isCaret);
|
||||
|
||||
Reference in New Issue
Block a user