summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-10-05 01:13:30 -0400
committerKris Maglione <maglione.k@gmail.com>2011-10-05 01:13:30 -0400
commit4722c8011e046663afcb40376c94632bcbc7157b (patch)
tree52b521c32915be4692b508d5daeb75ba4cab1778
parent9829b5e0591db7e30afe3dc7b7b65a491c00193a (diff)
downloadpentadactyl-4722c8011e046663afcb40376c94632bcbc7157b.tar.gz
Add v_o.
-rw-r--r--common/content/editor.js15
-rw-r--r--pentadactyl/NEWS2
2 files changed, 15 insertions, 2 deletions
diff --git a/common/content/editor.js b/common/content/editor.js
index 87274cee..6a28e3c4 100644
--- a/common/content/editor.js
+++ b/common/content/editor.js
@@ -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);
diff --git a/pentadactyl/NEWS b/pentadactyl/NEWS
index e0a3c307..8fc9ef3b 100644
--- a/pentadactyl/NEWS
+++ b/pentadactyl/NEWS
@@ -43,7 +43,7 @@
- Crude regular expression search is supported. [b8]
- New searches now start within the current viewport where possible. [b8]
• Text editing improvements, including:
- - Added t_gu and t_gU. [b8]
+ - Added t_gu, t_gU, and v_o. [b8]
- Added operator modes and proper first class motion maps. [b8]
- Improved undo support for most mappings. [b8]
• General completion improvements