Skip to content

Commit

Permalink
[vim map] Pasting buffer works correctly for partial lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanny authored and marijnh committed Jun 6, 2012
1 parent ad1bfdd commit b4e1059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keymap/vim.js
Expand Up @@ -322,8 +322,8 @@
"P": function(cm) {
var cur = cm.getCursor().line;
if (buf!= "") {
CodeMirror.commands.goLineEnd(cm);
cm.replaceSelection(buf, "end");
if (buf[0] == "\n") CodeMirror.commands.goLineEnd(cm);
cm.replaceRange(buf, cm.getCursor());
}
cm.setCursor(cur+1);
},
Expand Down

0 comments on commit b4e1059

Please sign in to comment.