Merge remote-tracking branch 'remotes/pull/2281'
This commit is contained in:
commit
724b66857d
2 changed files with 13 additions and 1 deletions
|
|
@ -2118,7 +2118,11 @@ dom.importCssString(".normal-mode .ace_cursor{\
|
||||||
newHead = copyCursor(origHead);
|
newHead = copyCursor(origHead);
|
||||||
}
|
}
|
||||||
if (vim.visualMode) {
|
if (vim.visualMode) {
|
||||||
newHead = clipCursorToContent(cm, newHead, vim.visualBlock);
|
|
||||||
|
if (!(vim.visualBlock && motion === "moveToEol")) {
|
||||||
|
newHead = clipCursorToContent(cm, newHead, vim.visualBlock);
|
||||||
|
}
|
||||||
|
|
||||||
if (newAnchor) {
|
if (newAnchor) {
|
||||||
newAnchor = clipCursorToContent(cm, newAnchor, true);
|
newAnchor = clipCursorToContent(cm, newAnchor, true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1957,6 +1957,14 @@ testVim('visual_line', function(cm, vim, helpers) {
|
||||||
helpers.doKeys('l', 'V', 'l', 'j', 'j', 'd');
|
helpers.doKeys('l', 'V', 'l', 'j', 'j', 'd');
|
||||||
eq(' 4\n 5', cm.getValue());
|
eq(' 4\n 5', cm.getValue());
|
||||||
}, { value: ' 1\n 2\n 3\n 4\n 5' });
|
}, { value: ' 1\n 2\n 3\n 4\n 5' });
|
||||||
|
testVim('visual_block_move_to_eol', function(cm, vim, helpers) {
|
||||||
|
// moveToEol should move all block cursors to end of line
|
||||||
|
cm.setCursor(0, 0);
|
||||||
|
helpers.doKeys('<C-v>', 'G', '$');
|
||||||
|
var selections = cm.getSelections().join();
|
||||||
|
console.log(selections);
|
||||||
|
eq("123,45,6", selections);
|
||||||
|
}, {value: '123\n45\n6'});
|
||||||
testVim('visual_block_different_line_lengths', function(cm, vim, helpers) {
|
testVim('visual_block_different_line_lengths', function(cm, vim, helpers) {
|
||||||
// test the block selection with lines of different length
|
// test the block selection with lines of different length
|
||||||
// i.e. extending the selection
|
// i.e. extending the selection
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue