提交 c82868d0 编写于 作者: A Alex Dima

Fixes #3882: Ctrl+Delete removing entire line when used at the end of line

上级 17a13cc8
......@@ -1759,7 +1759,7 @@ export class OneCursorOp {
if (nextWordOnLine) {
column = nextWordOnLine.end + 1;
} else {
column = 1;
column = maxColumn;
}
var deleteSelection = new Range(lineNumber, column, lineNumber, position.column);
......
......@@ -1347,6 +1347,30 @@ suite('Editor Controller - Regression tests', () => {
assertWordRight(50, ' /* Just some more text a+= 3 +5-3 + 7 */ '.length + 1);
});
});
test('issue #3882 (1): Ctrl+Delete removing entire line when used at the end of line', () => {
usingCursor({
text: [
'A line with text.',
' And another one'
],
}, (model, cursor) => {
moveTo(cursor, 1, 18, false);
deleteWordRight(cursor); assert.equal(model.getLineContent(1), 'A line with text. And another one', '001');
});
});
test('issue #3882 (2): Ctrl+Delete removing entire line when used at the end of line', () => {
usingCursor({
text: [
'A line with text.',
' And another one'
],
}, (model, cursor) => {
moveTo(cursor, 2, 1, false);
deleteWordLeft(cursor); assert.equal(model.getLineContent(1), 'A line with text. And another one', '001');
});
});
});
suite('Editor Controller - Cursor Configuration', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册