Skip to content

Commit

Permalink
Implement multiple selections
Browse files Browse the repository at this point in the history
Issue #778
  • Loading branch information
marijnh committed Jan 23, 2014
1 parent 71d992b commit 324ca9b
Show file tree
Hide file tree
Showing 3 changed files with 535 additions and 249 deletions.
7 changes: 4 additions & 3 deletions keymap/vim.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,14 @@
cm.state.vim = null;
}
});
function beforeSelectionChange(cm, cur) {
function beforeSelectionChange(cm, obj) {
var vim = cm.state.vim;
if (vim.insertMode || vim.exMode) return;

var head = cur.head;
var head = obj.ranges[0].head;
if (head.ch && head.ch == cm.doc.getLine(head.line).length) {
head.ch--;
obj.update([{anchor: obj.ranges[0].anchor,
head: {line: head.line, ch: head.ch - 1}}]);
}
}
function getOnPasteFn(cm) {
Expand Down

0 comments on commit 324ca9b

Please sign in to comment.